wallet-core/node_modules/@ava/babel-preset-transform-test-files/index.js
2017-05-28 00:40:43 +02:00

18 lines
396 B
JavaScript

'use strict';
const ESPOWER_PATTERNS = require('./espower-patterns.json');
module.exports = (context, options) => {
const plugins = [];
if (!options || options.powerAssert !== false) {
plugins.push(require('babel-plugin-espower/create')(context, {
embedAst: true,
patterns: ESPOWER_PATTERNS
}));
}
plugins.push(require('@ava/babel-plugin-throws-helper'));
return {plugins};
};