(args)
| 14 | |
| 15 | // helper to simulate running the CLI |
| 16 | function 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 | |
| 43 | function stubCallHelp() { |
| 44 | return td.replace(CLI.prototype, 'callHelp', td.function()); |
no test coverage detected
searching dependent graphs…