mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-14 16:52:26 +08:00
test(vue): add tests (#22089)
This commit is contained in:
14
packages/vue-router/test/jest.preprocessor.js
Normal file
14
packages/vue-router/test/jest.preprocessor.js
Normal file
@ -0,0 +1,14 @@
|
||||
const tsc = require('typescript');
|
||||
const tsConfig = require('../tsconfig.json');
|
||||
|
||||
// force the output to use commonjs modules required by jest
|
||||
tsConfig.compilerOptions.module = 'commonjs';
|
||||
|
||||
module.exports = {
|
||||
process(src, path) {
|
||||
if (path.endsWith('.ts') || path.endsWith('.tsx')) {
|
||||
return tsc.transpile(src, tsConfig.compilerOptions, path, []);
|
||||
}
|
||||
return src;
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user