@@ -5,12 +5,7 @@ import fixturify from 'fixturify';
55import { execa } from 'execa' ;
66import { beforeAll , beforeEach , describe , expect , it } from 'vitest' ;
77
8- import {
9- assertGeneratedCorrectly ,
10- dirContents ,
11- filesMatching ,
12- SUPPORTED_PACKAGE_MANAGERS ,
13- } from '../helpers.js' ;
8+ import { assertGeneratedCorrectly , filesMatching , SUPPORTED_PACKAGE_MANAGERS } from '../helpers.js' ;
149const blueprintPath = path . join ( __dirname , '../..' ) ;
1510let localEmberCli = require . resolve ( 'ember-cli/bin/ember' ) ;
1611
@@ -92,56 +87,56 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {
9287 await commandSucceeds ( `${ packageManager } run build` ) ;
9388
9489 expect (
95- await filesMatching ( 'src/**' , addonDir ) ,
90+ ( await filesMatching ( 'src/**' , addonDir ) ) . sort ( ) ,
9691 `ensure we don't pollute the src dir with declarations and emit the js and .d.ts to the correct folders -- this should be the same as the input files (no change from the fixture + default files)` ,
9792 ) . toMatchInlineSnapshot ( `
9893 [
94+ "src/components/another-gts.gts",
95+ "src/components/template-import.gts",
9996 "src/index.ts",
10097 "src/lint-test-gts.gts",
10198 "src/lint-test-ts.ts",
102- "src/template-registry.ts",
103- "src/components/another-gts.gts",
104- "src/components/template-import.gts",
10599 "src/services/example.ts",
100+ "src/template-registry.ts",
106101 ]
107102 ` ) ;
108103
109104 expect (
110- await filesMatching ( '{dist,declarations}/**/*' , addonDir ) ,
105+ ( await filesMatching ( '{dist,declarations}/**/*' , addonDir ) ) . sort ( ) ,
111106 `ensure we emit the correct files out of the box to the correct folders` ,
112107 ) . toMatchInlineSnapshot ( `
113108 [
114- "dist/index.js",
115- "dist/index.js.map",
116- "dist/lint-test-gts.js",
117- "dist/lint-test-gts.js.map",
118- "dist/lint-test-ts.js",
119- "dist/lint-test-ts.js.map",
120- "dist/template-registry.js",
121- "dist/template-registry.js.map",
122- "dist/components/another-gts.js",
123- "dist/components/another-gts.js.map",
124- "dist/components/template-import.js",
125- "dist/components/template-import.js.map",
126- "dist/services/example.js",
127- "dist/services/example.js.map",
128- "dist/_app_/components/another-gts.js",
129- "dist/_app_/components/template-import.js",
130- "dist/_app_/services/example.js",
109+ "declarations/components/another-gts.d.ts",
110+ "declarations/components/another-gts.d.ts.map",
111+ "declarations/components/template-import.d.ts",
112+ "declarations/components/template-import.d.ts.map",
131113 "declarations/index.d.ts",
132114 "declarations/index.d.ts.map",
133115 "declarations/lint-test-gts.d.ts",
134116 "declarations/lint-test-gts.d.ts.map",
135117 "declarations/lint-test-ts.d.ts",
136118 "declarations/lint-test-ts.d.ts.map",
137- "declarations/template-registry.d.ts",
138- "declarations/template-registry.d.ts.map",
139- "declarations/components/another-gts.d.ts",
140- "declarations/components/another-gts.d.ts.map",
141- "declarations/components/template-import.d.ts",
142- "declarations/components/template-import.d.ts.map",
143119 "declarations/services/example.d.ts",
144120 "declarations/services/example.d.ts.map",
121+ "declarations/template-registry.d.ts",
122+ "declarations/template-registry.d.ts.map",
123+ "dist/_app_/components/another-gts.js",
124+ "dist/_app_/components/template-import.js",
125+ "dist/_app_/services/example.js",
126+ "dist/components/another-gts.js",
127+ "dist/components/another-gts.js.map",
128+ "dist/components/template-import.js",
129+ "dist/components/template-import.js.map",
130+ "dist/index.js",
131+ "dist/index.js.map",
132+ "dist/lint-test-gts.js",
133+ "dist/lint-test-gts.js.map",
134+ "dist/lint-test-ts.js",
135+ "dist/lint-test-ts.js.map",
136+ "dist/services/example.js",
137+ "dist/services/example.js.map",
138+ "dist/template-registry.js",
139+ "dist/template-registry.js.map",
145140 ]
146141 ` ) ;
147142 } ) ;
0 commit comments