wallet-core/node_modules/@ava/babel-preset-transform-test-files/index.js

18 lines
396 B
JavaScript
Raw Normal View History

2017-05-28 00:38:50 +02:00
'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};
};