@@ -15,7 +15,7 @@ interface AssertGeneratedOptions {
1515 testAppLocation ?: string ;
1616 testAppName ?: string ;
1717 expectedStaticFiles ?: string [ ] ;
18- packageManager ?: 'npm' | 'yarn' | 'pnpm' ;
18+ packageManager ?: string ;
1919 typeScript ?: boolean ;
2020 existingMonorepo ?: boolean ;
2121}
@@ -35,27 +35,10 @@ export async function assertGeneratedCorrectly({
3535 typeScript = false ,
3636 existingMonorepo = false ,
3737} : AssertGeneratedOptions ) {
38- let addonPath = path . join ( projectRoot , addonLocation ?? 'my-addon' ) ;
39- let testAppPath = path . join ( projectRoot , testAppLocation ?? 'test-app' ) ;
40-
38+ let addonPath = path . join ( projectRoot ) ;
4139 expect ( await fse . pathExists ( addonPath ) , `${ addonPath } exists` ) . toBe ( true ) ;
42- expect ( await fse . pathExists ( testAppPath ) , `${ testAppPath } exists` ) . toBe ( true ) ;
43-
4440 let addonPackageJson = await packageJsonAt ( addonPath ) ;
45- let testAppPackageJson = await packageJsonAt ( testAppPath ) ;
46-
4741 expect ( addonPackageJson . name , `addon has correct name: ${ addonName } ` ) . toEqual ( addonName ) ;
48- expect ( testAppPackageJson . name , `testApp has correct name: ${ testAppName ?? 'test-app' } ` ) . toEqual (
49- testAppName ?? 'test-app' ,
50- ) ;
51-
52- expect (
53- [
54- ...Object . keys ( testAppPackageJson . dependencies || { } ) ,
55- ...Object . keys ( testAppPackageJson . devDependencies || { } ) ,
56- ] ,
57- `The test app has a (dev)dependency on the addon` ,
58- ) . to . include ( addonName ) ;
5942
6043 for ( let expectedFile of expectedStaticFiles ) {
6144 let pathToFile = path . join ( addonPath , expectedFile ) ;
@@ -84,7 +67,7 @@ interface AssertECUOptions {
8467 addonLocation ?: string ;
8568 testAppLocation ?: string ;
8669 testAppName ?: string ;
87- packageManager : 'npm' | 'yarn' | 'pnpm' ;
70+ packageManager : string ;
8871 typeScript : boolean ;
8972}
9073
@@ -105,11 +88,11 @@ export async function assertCorrectECUJson({
10588 expect ( json . projectName ) . toEqual ( addonName ) ;
10689 expect ( json . packages ) . toHaveLength ( 1 ) ;
10790
108- expect ( json . packages [ 0 ] . name ) . toEqual ( '@embroider /addon-blueprint' ) ;
91+ expect ( json . packages [ 0 ] . name ) . toEqual ( '@ember /addon-blueprint' ) ;
10992 expect ( json . packages [ 0 ] . version ) . toEqual ( ownPkg . version ) ;
11093
11194 expect ( json . packages [ 0 ] . blueprints ) . toHaveLength ( 1 ) ;
112- expect ( json . packages [ 0 ] . blueprints [ 0 ] . name ) . toEqual ( '@embroider /addon-blueprint' ) ;
95+ expect ( json . packages [ 0 ] . blueprints [ 0 ] . name ) . toEqual ( '@ember /addon-blueprint' ) ;
11396
11497 if ( packageManager !== 'npm' ) {
11598 expect ( json . packages [ 0 ] . blueprints [ 0 ] . options ) . toContain ( `--${ packageManager } ` ) ;
0 commit comments