forked from emberjs/ember.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
34 lines (28 loc) · 840 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
27
28
29
30
31
32
33
34
'use strict';
const maybePolyfillTypeScriptBlueprints = require('../-maybe-polyfill-typescript-blueprints');
const { modulePrefixForProject } = require('../-utils');
const useTestFrameworkDetector = require('../test-framework-detector');
module.exports = useTestFrameworkDetector({
description: 'Generates a service unit test.',
shouldTransformTypeScript: true,
init() {
this._super && this._super.init.apply(this, arguments);
maybePolyfillTypeScriptBlueprints(this);
},
fileMapTokens() {
return {
__root__() {
return 'tests';
},
__testType__() {
return 'unit';
},
};
},
locals(options) {
return {
modulePrefix: modulePrefixForProject(options.project),
friendlyTestDescription: ['Unit', 'Service', options.entity.name].join(' | '),
};
},
});