Skip to content

Add support for jh/jest.config.js

Paul Slaughter requested to merge ps-support-js-jest-config into master

What does this MR do and why?

JH needs the ability to customize the jest.config.js for their environment. See related MR and discussion.

How to set up and validate locally

  1. Checkout this branch

  2. Run yarn run jest and confirm that jest is finding all the tests. Hit CTRL-C to quit.

  3. Apply the following patch to add a jh/jest.config.js:

    diff --git a/jh/jest.config.js b/jh/jest.config.js
    new file mode 100644
    index 00000000000..c3f2dbb1604
    --- /dev/null
    +++ b/jh/jest.config.js
    @@ -0,0 +1,6 @@
    +const baseConfig = require('../jest.config.base');
    +
    +module.exports = {
    +  ...baseConfig('spec/frontend'),
    +  testPathIgnorePatterns: ['spec.js'],
    +};
    
  4. Run yarn run jest and confirm that jest does not find any tests, showing that the jh/jest.config.js is extending the base config.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Paul Slaughter

Merge request reports

Loading