strapi/jest-preset.unit.js

22 lines
724 B
JavaScript
Raw Permalink Normal View History

2022-11-16 16:31:01 +01:00
'use strict';
module.exports = {
2024-04-02 11:19:43 +02:00
setupFilesAfterEnv: [__dirname + '/tests/setup/unit.setup.js'],
2022-10-19 12:11:01 +03:00
modulePathIgnorePatterns: ['.cache', 'dist'],
testPathIgnorePatterns: [
'.testdata.{js,ts}',
'.test.utils.{js,ts}',
'.d.ts',
'__tests__/resources',
'tests/resources',
],
prettierPath: require.resolve('prettier-2'),
testMatch: ['**/__tests__/**/*.{js,ts,jsx,tsx}'],
transform: {
'^.+\\.(t|j)sx?$': ['@swc/jest'],
},
// Use `jest-watch-typeahead` version 0.6.5. Newest version 1.0.0 does not support jest@26
// Reference: https://github.com/jest-community/jest-watch-typeahead/releases/tag/v1.0.0
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
};