Skip to content

Commit 2d1cbe1

Browse files
committed
Check all generated files
1 parent fdff098 commit 2d1cbe1

1 file changed

Lines changed: 25 additions & 5 deletions

File tree

tests/smoke-tests/--typescript.test.ts

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,18 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {
8484
it('build', async () => {
8585
await commandSucceeds(`${packageManager} run build`);
8686

87-
let src = await dirContents(join(addonDir, 'src'));
88-
let dist = await dirContents(join(addonDir, 'dist'));
89-
let declarations = await dirContents(join(addonDir, 'declarations'));
90-
9187
expect(
92-
{ src, dist, declarations },
88+
{
89+
src: await dirContents(join(addonDir, 'src')),
90+
// rollup output:
91+
dist: await dirContents(join(addonDir, 'dist')),
92+
'dist/components': await dirContents(join(addonDir, 'dist/components')),
93+
'dist/services': await dirContents(join(addonDir, 'dist/services')),
94+
// glint output:
95+
declarations: await dirContents(join(addonDir, 'declarations')),
96+
'declarations/components': await dirContents(join(addonDir, 'declarations/components')),
97+
'declarations/services': await dirContents(join(addonDir, 'declarations/services')),
98+
},
9399
`ensure we don't pollute the src dir with declarations and emit the js and .d.ts to the correct folders`,
94100
).to.deep.equal({
95101
src: ['components', 'index.ts', 'services', 'template-registry.ts'],
@@ -102,6 +108,13 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {
102108
'template-registry.js',
103109
'template-registry.js.map',
104110
],
111+
'dist/components': [
112+
'another-gts.js',
113+
'another-gts.js.map',
114+
'template-import.js',
115+
'template-import.js.map',
116+
],
117+
'dist/services': ['example.js', 'example.js.map'],
105118
declarations: [
106119
'components',
107120
'index.d.ts',
@@ -110,6 +123,13 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {
110123
'template-registry.d.ts',
111124
'template-registry.d.ts.map',
112125
],
126+
'declarations/components': [
127+
'another-gts.gts.d.ts',
128+
'another-gts.gts.d.ts.map',
129+
'template-import.gts.d.ts',
130+
'template-import.gts.d.ts.map',
131+
],
132+
'declarations/services': ['example.d.ts', 'example.d.ts.map'],
113133
});
114134
});
115135

0 commit comments

Comments
 (0)