diff options
author | Marcia Ramos <marcia@gitlab.com> | 2019-06-25 18:28:34 +0300 |
---|---|---|
committer | Marcia Ramos <marcia@gitlab.com> | 2019-06-25 18:28:34 +0300 |
commit | 59a53e13969d6cbe9f5e187c450a3a7c20521e98 (patch) | |
tree | c909264c6fe77afa2ececb44a8fa2a5f9844922a /doc/development | |
parent | c0b1ae19c3d5b01f4daccba826bdedbebc7aa42e (diff) | |
parent | 4a125e97ccd9adf1007e20f3e7415d973d02486f (diff) |
Merge branch 'winh-jest-webpack-docs' into 'master'
Clarify that Jest does not use Webpack (docs)
See merge request gitlab-org/gitlab-ce!30000
Diffstat (limited to 'doc/development')
-rw-r--r-- | doc/development/testing_guide/frontend_testing.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/development/testing_guide/frontend_testing.md b/doc/development/testing_guide/frontend_testing.md index 4c9d1684c00..3949f61d4d4 100644 --- a/doc/development/testing_guide/frontend_testing.md +++ b/doc/development/testing_guide/frontend_testing.md @@ -28,6 +28,8 @@ we need to solve before being able to use Jest for all our needs. - Jest runs in a Node.js environment, not in a browser. Support for running Jest tests in a browser [is planned](https://gitlab.com/gitlab-org/gitlab-ce/issues/58205). - Because Jest runs in a Node.js environment, it uses [jsdom](https://github.com/jsdom/jsdom) by default. +- Jest does not have access to Webpack loaders or aliases. + The aliases used by Jest are defined in its [own config](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/jest.config.js). - All calls to `setTimeout` and `setInterval` are mocked away. See also [Jest Timer Mocks](https://jestjs.io/docs/en/timer-mocks). - `rewire` is not required because Jest supports mocking modules. See also [Manual Mocks](https://jestjs.io/docs/en/manual-mocks). - The following will cause tests to fail in Jest: |