File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
packages/angular_devkit/build_angular Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ export interface DevServerBuilderOptions {
5555 vendorChunk ?: boolean ;
5656 commonChunk ?: boolean ;
5757 baseHref ?: string ;
58+ deployUrl ?: string ;
5859 progress ?: boolean ;
5960 poll ?: number ;
6061 verbose ?: boolean ;
@@ -406,6 +407,7 @@ export class DevServerBuilder implements Builder<DevServerBuilderOptions> {
406407 'progress' ,
407408 'poll' ,
408409 'verbose' ,
410+ 'deployUrl' ,
409411 ] ;
410412
411413 // remove options that are undefined or not to be overrriden
Original file line number Diff line number Diff line change 1+ /**
2+ * @license
3+ * Copyright Google Inc. All Rights Reserved.
4+ *
5+ * Use of this source code is governed by an MIT-style license that can be
6+ * found in the LICENSE file at https://angular.io/license
7+ */
8+
9+ import { request , runTargetSpec } from '@angular-devkit/architect/testing' ;
10+ import { from } from 'rxjs' ;
11+ import { concatMap , take , tap } from 'rxjs/operators' ;
12+ import { DevServerBuilderOptions } from '../../src' ;
13+ import { devServerTargetSpec , host } from '../utils' ;
14+
15+
16+ describe ( 'Dev Server Deploy Url' , ( ) => {
17+ beforeEach ( done => host . initialize ( ) . toPromise ( ) . then ( done , done . fail ) ) ;
18+ afterEach ( done => host . restore ( ) . toPromise ( ) . then ( done , done . fail ) ) ;
19+
20+ it ( 'works' , ( done ) => {
21+ const overrides : Partial < DevServerBuilderOptions > = { deployUrl : 'test/' } ;
22+
23+ runTargetSpec ( host , devServerTargetSpec , overrides ) . pipe (
24+ tap ( ( buildEvent ) => expect ( buildEvent . success ) . toBe ( true ) ) ,
25+ concatMap ( ( ) => from ( request ( 'http://localhost:4200/test/polyfills.js' ) ) ) ,
26+ tap ( response => expect ( response ) . toContain ( 'window["webpackJsonp"]' ) ) ,
27+ take ( 1 ) ,
28+ ) . toPromise ( ) . then ( done , done . fail ) ;
29+ } , 30000 ) ;
30+ } ) ;
You can’t perform that action at this time.
0 commit comments