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

Update tests to use karma & work on Travis CI #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nfriedly
Copy link
Contributor

@nfriedly nfriedly commented Nov 1, 2019

As mentioned in #19 I had some trouble running the tests. It looks like they depend on some stuff that isn't there. However, I wanted to be sure of my changes for that PR, so I did a little bit of work to make the tests run in Karma.

With the current configuration:

  • npm test will start up whatever browsers are installed and run the tests once, then shut them down.
  • npm run watch will similarly start up whatever browsers are there, and then watch the filesystem for changes and run the tests after each change.

I'm not sure what your normal build process looks like, but I'm using browserify in the tests. Also, I couldn't find the assertion library that the tests referenced, but the standard node.js assert library seemed to be a drop-in replacement.

Lastly, I added a basic .travis.yml to run the tests automatically on travis-ci.org. You'll have to log in with your github credentials and enable it on this repo, but after that the tests will run automatically on every commit and PR.

There seems to be an issue with the Safari launcher on recent releases of Safari, hopefully that gets resolved soon. It does work in the version that's installed on Travis CI, although it takes about 6x longer than linux, so I just left it disabled. (There's something wrong with testing in Edge there, so I disabled windows also.)

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.

1 participant