Skip to content

Conversation

@johnholdun
Copy link
Collaborator

This patch brings Jest into the repo, adds coverage to timeSince, and provides the very beginning of a set of browser-based integration tests. The integration tests are skipped by default because they are too fragile, but can be run locally by changing describe.skip to describe.

I have no strong feelings on jest vs any other testing framework—this is just the one I've used the most. Happy to accept any alternatives!

Closes #21.

This patch brings Jest into the repo, adds coverage to timeSince, and provides the very beginning of a set of browser-based integration tests. The integration tests are skipped by default because they are too fragile, but can be run locally by changing describe.skip to describe.
"jest": true
},
"globals": {
"page": true
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think there ought to be a way to only allow this page global in *.test.js files but I'm not sure what it is

});

test('the future', () => {
expect(util.timeSince(now.valueOf() + 1000, now)).toEqual('-1s ago');
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is undesirable and basically undefined behavior, but at least now we can be confident that this is what happens!

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.

add tests

2 participants