How to use the jest-preset-angular/preprocessor.process function in jest-preset-angular

To help you get started, we’ve selected a few jest-preset-angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github storybookjs / storybook / scripts / jest-ts-babel.js View on Github external
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);
};

jest-preset-angular

Jest preset configuration for Angular projects

MIT
Latest version published 3 months ago

Package Health Score

86 / 100
Full package analysis

Popular jest-preset-angular functions