Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add jest tests to CI pipeline #2946

Closed
3 tasks done
yatki opened this issue Feb 25, 2019 · 2 comments · Fixed by #3094
Closed
3 tasks done

Add jest tests to CI pipeline #2946

yatki opened this issue Feb 25, 2019 · 2 comments · Fixed by #3094
Assignees

Comments

@yatki
Copy link
Contributor

yatki commented Feb 25, 2019

Expected behavior

  • We need to run Jest tests alongside with mocha tests on Jenkins.
  • We should be able to run jest tests and mocha test suites at once with a top level command. Eg "npm test:unit": "run-p mocha:unit jest:unit"
  • Merge code coverage from both test runners.

Actual behavior

  • Jenkinsfile is not configured to run Jest tests.
  • We don't have a top level command to run test runners.

Steps to reproduce

Which version(s) does this affect? (Environment, OS, etc...)

1.6.0

@yatki yatki self-assigned this Feb 25, 2019
@yatki yatki changed the title Add jest tests to ci pipeline Add jest tests to CI pipeline Feb 25, 2019
@michielmulders
Copy link
Contributor

michielmulders commented Mar 4, 2019

Added --passWithNotests flag for jest:integration and jest:functional as the absence of tests makes Jenkins fail.

@michielmulders
Copy link
Contributor

Jest added to Jenkins script and create a command that executes all tests for a certain type e.g. unit. However, using this command, the success/failure of the separate commands are lost between all the logs as they execute in parallel.

Todo @yatki

  • Work on merging code coverage
  • Possibly move the .code-coverage from root to test as the coverage from Mocha is located under /test. If doing so, check Jenkins script cleanup function (post step) for the Jest steps as paths need to be changed.

We can safely remove the --passWithNotests flag in package.json script for running Jest tests whenever we have tests for each type (functional and integration).

@yatki yatki added *medium and removed *easy labels Mar 15, 2019
MaciejBaj added a commit that referenced this issue Mar 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants