Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change assert.equal to assert.strictEqual #10071

Closed
wants to merge 1 commit into from

Conversation

YingjieFan
Copy link

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@santigimeno
Copy link
Member

The commit message should have the following format.
Other than that the changes LGTM

Use asssert.strictEqual to enforce coersion.
@YingjieFan YingjieFan closed this Dec 2, 2016
@YingjieFan YingjieFan reopened this Dec 2, 2016
@addaleax
Copy link
Member

addaleax commented Dec 2, 2016

@addaleax addaleax added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Dec 2, 2016
@YingjieFan
Copy link
Author

Why did the build failed? Didn't saw any useful information in the link.

@brad-decker
Copy link
Contributor

@YingjieFan @Trott said on one of my PRs that some of the code-and-learn CI jobs got killed by accident. Probably just needs a reviewer to restart them.

@Trott
Copy link
Member

Trott commented Dec 2, 2016

On the CI thing: This one was just a single failure on one of the (many) Windows builds. It's unrelated. No need to be concerned about it.

@YingjieFan
Copy link
Author

Thanks guys. How and when can we restart it ?

@Trott
Copy link
Member

Trott commented Dec 3, 2016

How and when can we restart it ?

No need. The host that failed to build is one that doesn't run the test you changed anyway. CI results for this change are 👌

@YingjieFan
Copy link
Author

@Trott Sorry I'm new to Git. Wonder how do I know if a change is in the 'trunk' or 'master' successfully? What confuse me is it got approved but test failed. Does that mean it will be rejected or merged?

@jasnell
Copy link
Member

jasnell commented Dec 3, 2016

@YingjieFan ... the changes here look good. The test failure here is nothing to worry about. One of the committers will merge the commit at some point in the next day or so. There should not be anything more that you need to do on this one!

The one thing I did notice about your commit is that you put your commit into your own fork's master branch. Doing so can be a bit problematic for you in the future should you want to continue contributing to Node.js core. It is better to create a local branch off of master, make your changes within that branch, and open PRs from there. There's nothing you need to do for this particular PR but just for future reference.

The way to do that if you're using the git command line is:

// make sure you're in master to start
$ git checkout master
$ git branch my-dev-branch
$ git checkout my-dev-branch
// make your changes and commit
$ git push --set-upstream origin/my-dev-branch

@mscdex mscdex added the net Issues and PRs related to the net subsystem. label Dec 3, 2016
Trott pushed a commit to Trott/io.js that referenced this pull request Dec 5, 2016
Use asssert.strictEqual to disallow coersion.

PR-URL: nodejs#10071
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott
Copy link
Member

Trott commented Dec 5, 2016

Landed in 5324a57.
Thanks for the contribution! 🎉

@Trott Trott closed this Dec 5, 2016
@brad-decker
Copy link
Contributor

Congrats @YingjieFan :)

@YingjieFan
Copy link
Author

I've been working with SVN all the time. It's really cool to learn some git and I really liked it. Thanks so much for all the help guys! @santigimeno @brad-decker @addaleax @Trott @jasnell

@YingjieFan
Copy link
Author

@jasnell I've been trying to understand the real purpose between fork's master vs other branch. Assume I create a branch based on master, the questions are:

  1. Why it's not ideal to commit to my fork's master?
  2. If I create a branch based on master and commit changes to that. How do I keep master/branch up to date to the origin(official nodeJS master)?
  3. After the pull request is merged into the upstream (nodeJS master), should I delete the dev branch or keep developing on that branch? (I guess the real question is:
    is the branch usually for a short-term dev like fixing 1 bug or completing 1 feature? Like I can delete it after bug is fixed and next time create a new branch for another purpose.)
  4. Is it normal to merge from a dev-branch to the fork's master?

Appreciate it if you can answer those questions for me.

Fishrock123 pushed a commit that referenced this pull request Dec 5, 2016
Use asssert.strictEqual to disallow coersion.

PR-URL: #10071
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Fishrock123 Fishrock123 mentioned this pull request Dec 5, 2016
2 tasks
@addaleax
Copy link
Member

addaleax commented Dec 5, 2016

  1. Why it's not ideal to commit to my fork's master?

That won’t work well once you have more than one pending pull request. For two simultaneous PRs, you’d definitely need two different branches.

  1. If I create a branch based on master and commit changes to that. How do I keep master/branch up to date to the origin(official nodeJS master)?
git remote add upstream [email protected]:nodejs/node.git # only do this once
git rebase upstream/master # this will keep your current branch up to date
  1. After the pull request is merged into the upstream (nodeJS master), should I delete the dev branch or keep developing on that branch?

It’s technically up to you, but for new PRs, you need to rebase old branches against upstream/master. I think basically everyone opens new branches for any new work.

Is it normal to merge from a dev-branch to the fork's master?

If you don’t use your fork’s master for PRs (which, as mentioned, you should usually not), you can do with your own master pretty much whatever you want.
However, it might be worth mentioning that this project won’t accept merge commits into its official branches.

addaleax pushed a commit to addaleax/node that referenced this pull request Dec 8, 2016
Use asssert.strictEqual to disallow coersion.

PR-URL: nodejs#10071
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
jmdarling pushed a commit to jmdarling/node that referenced this pull request Dec 8, 2016
Use asssert.strictEqual to disallow coersion.

PR-URL: nodejs#10071
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@YingjieFan
Copy link
Author

@addaleax thanks!

MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
Use asssert.strictEqual to disallow coersion.

PR-URL: #10071
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Dec 21, 2016
targos pushed a commit that referenced this pull request Dec 28, 2016
Use asssert.strictEqual to disallow coersion.

PR-URL: #10071
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Jan 23, 2017
Use asssert.strictEqual to disallow coersion.

PR-URL: #10071
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
Use asssert.strictEqual to disallow coersion.

PR-URL: #10071
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Feb 1, 2017
Use asssert.strictEqual to disallow coersion.

PR-URL: #10071
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.