File tree 3 files changed +76
-46
lines changed
packages/angular_devkit/build_angular/src/dev-server
3 files changed +76
-46
lines changed Load Diff This file was deleted.
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
+ import { serveWebpackBrowser } from '../../index' ;
9
+ import {
10
+ BASE_OPTIONS ,
11
+ DEV_SERVER_BUILDER_INFO ,
12
+ describeBuilder ,
13
+ setupBrowserTarget ,
14
+ } from '../setup' ;
15
+
16
+ describeBuilder ( serveWebpackBrowser , DEV_SERVER_BUILDER_INFO , ( harness ) => {
17
+ describe ( 'Option: "hmr"' , ( ) => {
18
+ beforeEach ( ( ) => {
19
+ setupBrowserTarget ( harness ) ;
20
+ } ) ;
21
+
22
+ it ( 'should not show a CommonJS usage warning when enabled' , async ( ) => {
23
+ harness . useTarget ( 'serve' , {
24
+ ...BASE_OPTIONS ,
25
+ hmr : true ,
26
+ } ) ;
27
+
28
+ const { result, logs } = await harness . executeOnce ( ) ;
29
+
30
+ expect ( result ?. success ) . toBe ( true ) ;
31
+ expect ( logs ) . not . toContain (
32
+ jasmine . objectContaining ( {
33
+ message : jasmine . stringMatching ( 'CommonJS or AMD dependencies' ) ,
34
+ } ) ,
35
+ ) ;
36
+ } ) ;
37
+ } ) ;
38
+ } ) ;
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
+ import { serveWebpackBrowser } from '../../index' ;
9
+ import {
10
+ BASE_OPTIONS ,
11
+ DEV_SERVER_BUILDER_INFO ,
12
+ describeBuilder ,
13
+ setupBrowserTarget ,
14
+ } from '../setup' ;
15
+
16
+ describeBuilder ( serveWebpackBrowser , DEV_SERVER_BUILDER_INFO , ( harness ) => {
17
+ describe ( 'Option: "liveReload"' , ( ) => {
18
+ beforeEach ( ( ) => {
19
+ setupBrowserTarget ( harness ) ;
20
+ } ) ;
21
+
22
+ it ( 'should not show a CommonJS usage warning when enabled' , async ( ) => {
23
+ harness . useTarget ( 'serve' , {
24
+ ...BASE_OPTIONS ,
25
+ liveReload : true ,
26
+ } ) ;
27
+
28
+ const { result, logs } = await harness . executeOnce ( ) ;
29
+
30
+ expect ( result ?. success ) . toBe ( true ) ;
31
+ expect ( logs ) . not . toContain (
32
+ jasmine . objectContaining ( {
33
+ message : jasmine . stringMatching ( 'CommonJS or AMD dependencies' ) ,
34
+ } ) ,
35
+ ) ;
36
+ } ) ;
37
+ } ) ;
38
+ } ) ;
You can’t perform that action at this time.
0 commit comments