@@ -3,16 +3,16 @@ import { expectFileToExist, readFile, rimraf } from '../../../utils/fs';
33import { ng } from '../../../utils/process' ;
44
55export default async function ( ) {
6- // forcibly remove in case another test doesn't clean itself up
7- await rimraf ( 'node_modules/@angular/pwa' ) ;
8- await ng ( 'add' , '@angular/pwa' ) ;
9- await expectFileToExist ( join ( process . cwd ( ) , 'src/manifest.webmanifest' ) ) ;
6+ // forcibly remove in case another test doesn't clean itself up
7+ await rimraf ( 'node_modules/@angular/pwa' ) ;
8+ await ng ( 'add' , '@angular/pwa' ) ;
9+ await expectFileToExist ( join ( process . cwd ( ) , 'src/manifest.webmanifest' ) ) ;
1010
11- // Angular PWA doesn't install as a dependency
12- const { dependencies, devDependencies } = JSON . parse ( await readFile ( join ( process . cwd ( ) , 'package.json' ) ) ) ;
13- const hasPWADep = Object . keys ( { ...dependencies , ...devDependencies } )
14- . some ( d => d === '@angular/pwa' ) ;
15- if ( hasPWADep ) {
16- throw new Error ( `Expected 'package.json' not to contain a dependency on '@angular/pwa'.` ) ;
17- }
11+ // Angular PWA doesn't install as a dependency
12+ const { dependencies, devDependencies } = JSON . parse ( await readFile ( join ( process . cwd ( ) , 'package.json' ) ) ) ;
13+ const hasPWADep = Object . keys ( { ...dependencies , ...devDependencies } )
14+ . some ( d => d === '@angular/pwa' ) ;
15+ if ( hasPWADep ) {
16+ throw new Error ( `Expected 'package.json' not to contain a dependency on '@angular/pwa'.` ) ;
17+ }
1818}
0 commit comments