()
| 25 | } |
| 26 | |
| 27 | function runBuildWatchTask() { |
| 28 | let project = new MockProject(); |
| 29 | |
| 30 | ui = project.ui; |
| 31 | let _builder = new Builder({ |
| 32 | ui, |
| 33 | project, |
| 34 | setupBroccoliBuilder, |
| 35 | onProcessInterrupt: { |
| 36 | addHandler() {}, |
| 37 | removeHandler() {}, |
| 38 | }, |
| 39 | }); |
| 40 | |
| 41 | let _watcher = { |
| 42 | then(fulfillmentHandler, rejectionHandler) { |
| 43 | return Promise.resolve().then(fulfillmentHandler, rejectionHandler); |
| 44 | }, |
| 45 | }; |
| 46 | |
| 47 | task = new BuildWatchTask({ |
| 48 | ui, |
| 49 | project, |
| 50 | }); |
| 51 | |
| 52 | let options = { |
| 53 | outputPath: 'tmp/build-watch-task-test', |
| 54 | environment: 'test', |
| 55 | _builder, |
| 56 | _watcher, |
| 57 | }; |
| 58 | return task.run(options); |
| 59 | } |
| 60 | |
| 61 | describe('onInterrupt', function () { |
| 62 | it('fulfills the run promise and cleans up the builder', async function () { |
no test coverage detected
searching dependent graphs…