mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 23:45:48 +08:00
016503d8c3
* feat: registry first iteration Signed-off-by: Sami Mazouz <sychocouldy@gmail.com> * feat: improve webpack auto export loader Signed-off-by: Sami Mazouz <sychocouldy@gmail.com> * chore: remove `compat` API Signed-off-by: Sami Mazouz <sychocouldy@gmail.com> * chore: cleanup Signed-off-by: Sami Mazouz <sychocouldy@gmail.com> --------- Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
23 lines
502 B
JavaScript
23 lines
502 B
JavaScript
const path = require('path');
|
|
|
|
module.exports = (options = {}) => ({
|
|
testEnvironment: 'jsdom',
|
|
extensionsToTreatAsEsm: ['.ts', '.tsx'],
|
|
transform: {
|
|
'^.+\\.[tj]sx?$': [
|
|
'babel-jest',
|
|
require('flarum-webpack-config/babel.config.cjs'),
|
|
],
|
|
'^.+\\.tsx?$': [
|
|
'ts-jest',
|
|
{
|
|
useESM: true,
|
|
},
|
|
],
|
|
},
|
|
preset: 'ts-jest',
|
|
setupFilesAfterEnv: [path.resolve(__dirname, 'setup-env.js')],
|
|
moduleDirectories: ['node_modules', 'src'],
|
|
...options,
|
|
});
|