MCPcopy
hub / github.com/ember-cli/ember-cli / ember

Function ember

tests/unit/cli/cli-test.js:16–41  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

14
15// helper to simulate running the CLI
16function ember(args) {
17 let cli = new CLI({
18 ui,
19 testing: true,
20 });
21
22 let startInstr = td.replace(cli.instrumentation, 'start');
23 let stopInstr = td.replace(cli.instrumentation, 'stopAndReport');
24
25 return cli
26 .run({
27 tasks: {},
28 commands,
29 cliArgs: args || [],
30 settings: {},
31 project,
32 })
33 .then(function (value) {
34 td.verify(stopInstr('init'), { times: 1 });
35 td.verify(startInstr('command'), { times: 1 });
36 td.verify(stopInstr('command', td.matchers.anything(), td.matchers.isA(Array)), { times: 1 });
37 td.verify(startInstr('shutdown'), { times: 1 });
38
39 return value;
40 });
41}
42
43function stubCallHelp() {
44 return td.replace(CLI.prototype, 'callHelp', td.function());

Callers 15

inRepoAddonFunction · 0.85
initAppFunction · 0.85
cli-test.jsFile · 0.85
verboseCommandFunction · 0.85
initAppFunction · 0.85
initInRepoAddonFunction · 0.85
new-test-slow.jsFile · 0.85
new-test.jsFile · 0.85
addon-test.jsFile · 0.85
initAddonFunction · 0.85

Calls 2

runMethod · 0.95
thenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…