Commit Graph

33 Commits

Author SHA1 Message Date
Jukka Kurkela
910158055f
Drop legacy browser support (#8009)
* Drop legacy browser support

* Docs

* Use rollup-plugin-istanbul for coverage

* exclude node_modules from coverage

* No cleanup() when doing coverage
2020-11-16 21:01:33 +02:00
Jukka Kurkela
63ab5a03d7
Record test coverage per browser (#8033) 2020-11-10 19:59:11 +02:00
Jukka Kurkela
dd261b22f9
Use interpolation in fill: 'stack' (and fix interpolation) (#7711)
* Add tests and fix _boundSegment
* Use interpolate for finding points below
* Remove _refPoints logic (getTarget in draw)
2020-08-16 11:18:46 -04:00
Jukka Kurkela
6ad17c0294
Stop bundling specs for improved coverage (#7709) 2020-08-14 09:15:18 -04:00
Jukka Kurkela
40e9029a59
ESM build, with helpers separated (#7400)
* ESM build, with helpers separated
* Remove umd environment
* Include the chunks in package
2020-06-23 19:02:51 -04:00
Jukka Kurkela
99580664af
Remove babel from tests (#7521)
* Remove babel from tests
* Remove unused require
2020-06-18 17:38:09 -04:00
Jukka Kurkela
690d07ba9b
Update packages (#7463) 2020-06-04 19:51:34 -04:00
Jukka Kurkela
614fa07c99
Use verbose build in dev mode (#7455)
* Use verbose build in dev mode
* Update comment
2020-06-03 18:04:49 -04:00
Jukka Kurkela
064a2f3a0b
Replace gulp with npm scripts (#7402)
Gulp removed from toolchain in favour of simpler build process
2020-05-27 17:14:17 -04:00
Evert Timberg
29043f152b
Consider all timestamps for bar measuring (#7421)
* Consider all timestamps for bar measuring
* Fix watched tests for updated file names
* Add test of sparse bar time scales
2020-05-27 12:22:00 -04:00
Ben McCann
53205457dc
Add tests for rendering to offscreen canvas (#7175)
Add tests for using an offscreen canvas for Chart.js. These tests are
almost identical to existing tests, but with offscreen canvas enabled.

Co-authored-by: David Winegar <david.winegar@getcruise.com>
2020-03-06 12:17:12 -05:00
Jukka Kurkela
df3c73cc5e
Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment
2020-02-27 19:40:31 -05:00
Ben McCann
f3ef620c68
Make test Context an ES6 module (#7142)
* Make test Context an ES6 module

* Address comments
2020-02-23 08:08:06 -05:00
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