Skip to content

Conversation

@vramana
Copy link
Contributor

@vramana vramana commented Jun 15, 2015

No description provided.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is dead code. This is already present in the if statement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep.

@emmenko
Copy link
Contributor

emmenko commented Jun 15, 2015

The file should be named shallowEquality.spec.js

@vramana
Copy link
Contributor Author

vramana commented Jun 15, 2015

@emmenko Okay.Sorry I didn't notice it.

@emmenko
Copy link
Contributor

emmenko commented Jun 15, 2015

Np :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's only test things whose typeof is object. This includes null, but not undefined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gaearon I don't know how to concisely describe shallowEqualScalar. Help please? or just leave it be since I have left the comment?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“should compare shallowly but bail out on object fields”

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please tweak the style to use spaces inside object definitions. ({a : 1} => { a: 1 }). This doesn't concern arrays, just objects.

@vramana
Copy link
Contributor Author

vramana commented Jun 16, 2015

@gaearon Can you take a look now ?

@ooflorent
Copy link
Contributor

Currently the following test fails:

expect(shallowEqual({a: NaN}, {a: NaN})).toBe(true)

Maybe we should fix that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this line?

@emmenko
Copy link
Contributor

emmenko commented Jun 16, 2015

@ooflorent 👍

@vramana
Copy link
Contributor Author

vramana commented Jun 16, 2015

@ooflorent Done. Anything else?

gaearon added a commit that referenced this pull request Jun 16, 2015
@gaearon gaearon merged commit 379ea8b into reduxjs:master Jun 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants