Migrate timeline_entry_item_spec.js to Jest
What does this MR do?
This moves timeline_entry_item_spec.js
to Jest and adds the basic setup to test Vue with Jest.
Running the test file individually is now almost three times faster:
yarn karma -f spec/javascripts/vue_shared/components/notes/timeline_entry_item_spec.js |
yarn jest spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js |
---|---|
yarn run v1.12.0 $ BABEL_ENV=${BABEL_ENV:=karma} karma start --single-run true config/karma.config.js -f spec/javascripts/vue_shared/components/notes/timeline_entry_item_spec.js ℹ 「wdm」: ℹ 「wdm」: Compiled successfully. 10 12 2018 11:06:59.227:INFO [karma]: Karma v3.0.0 server started at http://0.0.0.0:9876/ 10 12 2018 11:06:59.232:INFO [launcher]: Launching browser ChromeHeadlessCustom with unlimited concurrency 10 12 2018 11:06:59.240:INFO [launcher]: Starting browser Chrome 10 12 2018 11:07:02.932:INFO [Chrome]: Connected on socket j9lJSfcDUk2cGGAYAAAA with id 69047653 Chrome: Executed 6 of 6 SUCCESS (0.066 secs / 0.056 secs) TOTAL: 6 SUCCESS ✨ Done in 12.65s. |
yarn run v1.12.0 $ BABEL_ENV=jest jest --config=config/jest.config.js spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js PASS spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js TimelineEntryItem ✓ renders correctly (29ms) ✓ accepts default slot (11ms) |
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/52483
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by Inactive Account