forked from emberjs/ember-test-helpers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
26 lines (20 loc) · 757 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
'use strict';
const BroccoliDebug = require('broccoli-debug');
const debugTree = BroccoliDebug.buildDebugCallback('ember-test-helpers');
module.exports = {
name: require('./package').name,
treeForAddonTestSupport(tree) {
let input = debugTree(tree, 'addon-test-support:input');
if (this.isDevelopingAddon()) {
const {
BroccoliBabelPresetTypeScript,
} = require('broccoli-babel-preset-typescript'); // eslint-disable-line node/no-unpublished-require
input = new BroccoliBabelPresetTypeScript([input]);
}
const output = this.preprocessJs(input, '/', this.name, {
registry: this.registry,
treeType: 'addon-test-support',
});
return debugTree(output, 'addon-test-support:output');
},
};