mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-17 05:02:23 +08:00
11 lines
480 B
JavaScript
11 lines
480 B
JavaScript
const tsTransformer = require('jest-preset-angular/preprocessor');
|
|
const babelTransformer = require('./babel-jest');
|
|
|
|
module.exports.process = function transform(src, path, config, transformOptions) {
|
|
const tsResult = tsTransformer.process(src, path, config, transformOptions);
|
|
const jsPath = path.replace('.ts', '.js');
|
|
const source = typeof tsResult === 'string' ? tsResult : tsResult.code;
|
|
|
|
return babelTransformer.process(source, jsPath, config, transformOptions);
|
|
};
|