Commit a2d142d
committed
(refactor/test): switch to cypress as test environment
- use a full browser for testing instead of running in Node and
relying on JSDOM, which does not implement all of the features we
use (namely worker-related stuff)
- this ensures tests run without any errors
- use cypress's webpack and browserify preprocessors to bundle up the
code and tests for each instead of building the bundles outside of
the test process
- at least one of these is needed (browserify is cypress's default)
because we use `require` in tests, which isn't available in a
browser ofc
- and actually using the browserify preprocessor on the browserify
bundle caused lots of errors (it seems to use its own `require`
when parsing the bundle, causing module not found errors)
- no need for several package.json scripts anymore
- no need for webpack-cli anymore
- no need for helper files for import / export anymore
- move the webpack and browserify config into the cypress preprocessor
config
- cypress handles input and output, so those sections can be entirely
removed, basically just leaving noParse
- can't use externals here because those have to be provided to the
browser (otherwise will give a ReferenceError)
- move the tests to cypress/integration/, cypress's default folder
- and refactor them to cypress's mocha/chai style from AVA style
- basically everything was (re)moved from test/ to cypress/1 parent 713f6a9 commit a2d142d
File tree
18 files changed
+2491
-3537
lines changed- cypress
- integration
- plugins
- support
- test
- build-config
- utils
- browserify
- webpack
18 files changed
+2491
-3537
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 39 | + | |
50 | 40 | | |
51 | 41 | | |
52 | 42 | | |
53 | 43 | | |
54 | 44 | | |
55 | 45 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 46 | + | |
| 47 | + | |
59 | 48 | | |
60 | | - | |
| 49 | + | |
61 | 50 | | |
62 | 51 | | |
63 | | - | |
64 | 52 | | |
65 | 53 | | |
66 | 54 | | |
| |||
This file was deleted.
0 commit comments