Browse Source

chore(deps): update ignore patterns for jest

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
pull/10626/head
Maksim Sukharev 2 years ago
parent
commit
50598f0b65
No known key found for this signature in database GPG Key ID: 6349D071889BD1D5
  1. 51
      jest.config.js
  2. 3
      src/types/vendor/@nextcloud/vue.d.ts

51
jest.config.js

@ -22,43 +22,38 @@
const { resolve } = require('node:path')
// Listed packages will be transformed with babel-jest
// TODO: find a way to consolidate this in one place, with webpack.common.js
const ignorePatterns = [
'(vue-material-design-icons)',
'(@juliushaertl)',
'(tributejs)',
'(@nextcloud/vue)',
'(splitpanes)',
'(string-length)',
'(strip-ansi)',
'(ansi-regex)',
'(char-regex)',
'(uuid)',
'(unist*)',
'(unified)',
'(bail)',
'(remark*)',
'(is-*)',
'(trough)',
'(vfile)',
'(mdast*)',
'(micromark)',
'(decode-named-character-reference)',
'(trim-lines)',
'(rehype*)',
'(hast-*)',
'(property-information)',
'(space-separated-tokens)',
'(comma-separated-tokens)',
'(web-namespaces)',
'bail',
'comma-separated-tokens',
'decode-named-character-reference',
'devlop',
'escape-string-regexp',
'hast-.*',
'is-.*',
'mdast-.*',
'micromark',
'property-information',
'rehype-.*',
'remark-.*',
'space-separated-tokens',
'trim-lines',
'trough',
'unified',
'unist-.*',
'vfile',
'vue-material-design-icons',
'web-namespaces',
]
module.exports = {
// Allow tests in the src and in tests/unit folders
testMatch: ['<rootDir>/src/**/*.(spec|test).(ts|js)'],
// Transform packages from top-level and nested 'node_modules'
transformIgnorePatterns: [
'node_modules/(?!' + ignorePatterns.join('|') + '/)',
`<rootDir>/node_modules/(?!(?:.*\\/node_modules\\/)?(?:${ignorePatterns.join('|')}))`,
],
resetMocks: false,
setupFiles: ['jest-localstorage-mock'],

3
src/types/vendor/@nextcloud/vue.d.ts

@ -1,4 +1 @@
declare module '@nextcloud/vue/dist/Directives/Tooltip.vue';
declare module '@nextcloud/vue/dist/Components/Button.vue';
declare module '@nextcloud/vue/dist/Components/NcActions.vue';
declare module '@nextcloud/vue/dist/Components/NcActionButton.vue';
Loading…
Cancel
Save