diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-06-10 15:33:27 +0300 |
---|---|---|
committer | Marco Ambrosini <marcoambrosini@pm.me> | 2021-06-10 17:40:09 +0300 |
commit | deeeec37b652ae5fb96df738eed47a197d4fc99d (patch) | |
tree | 739e7104ec6d08436750b7175ed451bb8b134efb /jest.config.js | |
parent | c6627446672379bf1913ffe898df460d1776b4af (diff) |
Adjust Jest tests for 4.0.0
Add additional excluded patterns.
Add global appName value in test setup.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'jest.config.js')
-rw-r--r-- | jest.config.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/jest.config.js b/jest.config.js index 2e3a7a3f1..8df201d95 100644 --- a/jest.config.js +++ b/jest.config.js @@ -20,12 +20,24 @@ * */ +// TODO: find a way to consolidate this in one place, with webpack.common.js +const ignorePatterns = [ + 'vue-material-design-icons', + '@juliushaertl', + 'tributejs', + 'splitpanes', + 'string-length', + 'strip-ansi', + 'ansi-regex', + 'char-regex', +] + module.exports = { preset: '@vue/cli-plugin-unit-jest/presets/no-babel', // Allow tests in the src and in tests/unit folders testMatch: ['<rootDir>/src/**/*.(spec|test).(ts|js)'], transformIgnorePatterns: [ - 'node_modules/(?!(vue-material-design-icons|@juliushaertl|tributejs)/)', + 'node_modules/(?!(' + ignorePatterns.join('|') + ')/)', ], resetMocks: false, setupFiles: ['jest-localstorage-mock'], |