-
-
Notifications
You must be signed in to change notification settings - Fork 72
add missing test for target being a primitive #34
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
Conversation
@@ -100,6 +100,13 @@ it('should preserve property order', function () { | |||
assert.equal(Object.keys(target).join(''), letters); | |||
}); | |||
|
|||
it('target can be primatives', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I'd rather see AVA as testing framework, if mocha
is used, the convention of titles is more like this:
it('should accept primitives as target', function () {
7491a10
to
d899158
Compare
@@ -5,7 +5,7 @@ var assert = require('assert'); | |||
Object.assign = undefined; | |||
var objectAssign = require('./'); | |||
|
|||
it('should have the correct length', function () { | |||
it('should expect at least 2 arguments', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect. It's testing how many arguments are there in the code, just what's passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, don't do unrelated changes when doing a PR ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... from mdn, it should mean the number of arguments expected by the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arguments.length
is how many arguments.
d899158
to
2d4b89e
Compare
I removed unrelated changes |
2d4b89e
to
b199aa6
Compare
Thanks :) |
No description provided.