Commit Graph

20 Commits

Author SHA1 Message Date
Jukka Kurkela
e26ed1413a
Fix coveralls (#7148) 2020-02-22 14:36:05 -05:00
Jukka Kurkela
564c027a1e
Output ES6 from babel (#7136) 2020-02-21 18:55:53 -05:00
Ben McCann
7b9a0a775c
Rollup plugins live in new location (#7134) 2020-02-20 18:19:59 -05:00
Ben McCann
e2145e3b55
Turn on excludeNotExported (#7121) 2020-02-20 12:18:21 -05:00
Jukka Kurkela
f2aa88f49d
Prepare babel & karma for class properties (#7126)
* Prepare babel & karma for class properties
* Remove rollup-plugin-istanbul
2020-02-19 14:24:16 -05:00
Jukka Kurkela
14df2c6722 Enable imports for tests (#6997) 2020-01-21 15:44:14 -05:00
Ben McCann
33f08f53b5 Make tests work with karma-cli (#6840) 2019-12-17 14:18:19 -05:00
Edward Thomson
aff7d41140 Add cross-platform CI (#6670)
* Linux and Windows CI with GitHub Actions
* Add karma-edge-launcher
* Add edge configuration to karma.conf.js
* Support --browsers on the command line for karma tests
* Add macOS CI builds
* Add karma-safari-private-launcher
* Document browser specification for tests
2019-11-06 07:14:09 -05:00
Simon Brunel
35273ee948
Optimize the npm package by removing useless files (#6105)
Explicitly target files that should be included in the npm package, making it 10x smaller by removing the docs, samples, scripts, sources, tests and other useless files.
2019-03-03 15:19:11 +01:00
Simon Brunel
2a97ec21c5
Migrate from Browserify to rollup (#5904)
Browserify isn't optimal bundling Chart.js because it adds too many internal wrappers, doesn't handle external/global dependencies and doesn't provide a way to generate ESM builds. Therefore, it seems the right choice to switch to rollup, so move all the build process in `rollup.config.js` and make Gulp to execute `rollup -c`.

We also had to switch to Terser instead of UglifyJS because this last one contains a breaking bug. Note that tests now use the exact same rollup config as our builds (the minified one) to ensure that the bundling and minification steps don't break anything. Finally, replace the `gulp watch` task by `gulp build --watch` to be consistent with the other `unittest` and `docs` watching syntax.
2018-12-14 20:20:43 +01:00
Simon Brunel
2dbf1cd1af
Add support for *.js test fixture config (#5777)
JSON doesn't support functions which are needed to create scriptable options, so implement a very basic method to load a JavaScript file exporting the config in `module.exports`. Also rename test sources (remove the `jasmine.` prefix), cleanup `karma.conf.js` and add an example .js fixture config (bubble radius option).
2018-10-20 11:38:48 +02:00
Simon Brunel
3010173733 Disable hardware acceleration for unit tests
Explicitly disable hardware acceleration to make image diff more stable when ran on Travis and dev machine.
2018-07-29 22:43:23 +02:00
Ben McCann
da3aa68f38 Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests.
2018-06-26 08:56:53 +02:00
Ben McCann
9f32f0775a Attempt to fix test flakiness (Firefox) (#4880)
These settings deal with browser disconnects. We had seen test flakiness from Firefox:
[Firefox 56.0.0 (Linux 0.0.0)]: Disconnected (1 times), because no message in 10000 ms
2017-10-22 17:32:39 +02:00
Simon Brunel
e3f3b8978b Add gulp unittest --coverage argument (#4075)
Coverage data are now generated by running `gulp unittest` with the `--coverage` argument: unit tests are then executed a single time on Travis. The gulp `coverage` task has been removed and `karma.coverage.conf.ci.js` merged into `karma.conf.ci.js`.

Update documentation with gulp commands (and remove them from `README.md`) and remove unused `config.jshintrc` (oversight from #3256). Delete `thankyou.md` which has been merged into `README.md`.
2017-03-25 18:26:45 +01:00
Simon Brunel
c216c0af76 Cleanup and upgrade unit tests environment
`karma.conf.ci.js` has been merged into `karma.conf.js` for local testing consistency: `gulp unittestWatch` has been replaced by `gulp unittest --watch` and thus use exactly the same config file. Upgrade to latest jasmine and karma packages and remove deprecated `gulp-karma` dependency (directly use `karma.Server` in gulp).

Split `test/mockContext.js` into smaller `test/jasmine.*` modules to make easier unit tests maintenance and finally, move all `*.test.js` files under the `test/specs` folder.
2017-03-04 11:39:48 -05:00
etimberg
a84f9d9177 Update other test tasks to use karma-browserify 2016-02-13 21:58:49 -05:00
Evert Timberg
e681d8cf23 Better debug page reporting of failed tests 2015-08-30 18:23:53 -04:00
Evert Timberg
f636a78977 Watch mode runs tests. 2015-08-23 15:55:10 -04:00
Evert Timberg
c1cca356df Initial test setup 2015-08-23 14:58:19 -04:00