aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@ava/babel-preset-transform-test-files/index.js
blob: 7af76c7e156f7ce1ab75211d37711e974185d80a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'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};
};