forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rebuilds_spec_large.ts
27 lines (23 loc) · 902 Bytes
/
rebuilds_spec_large.ts
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
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { runTargetSpec } from '@angular-devkit/architect/testing';
import { debounceTime, take, tap } from 'rxjs/operators';
import { host, karmaTargetSpec } from '../utils';
describe('Karma Builder watch mode', () => {
beforeEach(done => host.initialize().toPromise().then(done, done.fail));
afterEach(done => host.restore().toPromise().then(done, done.fail));
it('works', async () => {
const overrides = { watch: true };
const res = await runTargetSpec(host, karmaTargetSpec, overrides).pipe(
debounceTime(500),
tap((buildEvent) => expect(buildEvent.success).toBe(true)),
take(1),
).toPromise();
expect(res).toEqual({ success: true });
}, 30000);
});