-
Notifications
You must be signed in to change notification settings - Fork 68
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
Lens tests #366
Lens tests #366
Conversation
test/lens.spec.js
Outdated
let object = { a: 1 } | ||
let lens = F.lensOf(object) | ||
lens.a.set(8) | ||
expect(lens.a.get()).to.deep.equal(8) |
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.
Deep equal makes more sense for objects with more than one level of nesting. It's not necessary for primitives.
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.
Thank you @stellarhoof. I fixed it.
@daedalus28 The branch is up to date and the tests are valid. The PR is ready for revision. |
CHANGELOG.md
Outdated
@@ -40,6 +44,7 @@ | |||
- Library issue resolution, two libraries where auto-updating minor versions and no longer compatible in those versions. | |||
- Added ignore for yarn as NPM is being used currently | |||
- Added versioning of package-lock files to resolve dependency issue. | |||
> > > > > > > master |
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.
Leftover
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.
Good find, thank you.
@@ -242,25 +205,24 @@ describe("Lens Functions", () => { | |||
}) | |||
}) | |||
describe("domLens", () => { | |||
it("value", () => { | |||
it("domLens.value", () => { |
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.
No need for domLens.
since the group is already named domLens
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.
@stellarhoof The it(string, ) has to match the title that appears in the docs. That's how they get matched. In the docs we have F.domLens.value and more, so the it
has to be it('domLens.value', ...). Even so, sometimes the test is not found and hence there's no example for a function. At least that's how it was explained to me.
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.
Got it
-Added one missing test and organized the rest.
-Please pay attention to a group of tests that are under the domLens object. I named those
domLens.hover
,domLens.focus
, etc. I'm not sure about that so please comment.