-
-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathtry-each.js
More file actions
36 lines (28 loc) · 956 Bytes
/
try-each.js
File metadata and controls
36 lines (28 loc) · 956 Bytes
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
35
36
'use strict';
const debug = require('debug')('ember-try:commands:try-each');
module.exports = {
name: 'try:each',
description:
'Runs each of the dependency scenarios specified in config with the specified command. The command defaults to `ember test`',
works: 'insideProject',
availableOptions: [
{ name: 'skip-cleanup', type: Boolean, default: false },
{ name: 'config-path', type: String },
],
_getConfig: require('../utils/config'),
_TryEachTask: require('../tasks/try-each'),
async run(commandOptions) {
debug('Options:\n', commandOptions);
let cwd = this.project.root;
let config = await this._getConfig({
configPath: commandOptions.configPath,
cwd,
});
debug('Config: %s', JSON.stringify(config));
let tryEachTask = new this._TryEachTask({
config,
cwd,
});
return await tryEachTask.run(config.scenarios, { skipCleanup: commandOptions.skipCleanup });
},
};