diff --git a/files/__addonLocation__/package.json b/files/__addonLocation__/package.json index a24f0b1a..59625848 100644 --- a/files/__addonLocation__/package.json +++ b/files/__addonLocation__/package.json @@ -25,6 +25,7 @@ "lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern", "lint:js:fix": "eslint . --fix",<% if (typescript) { %> "lint:types": "glint", + "lint:types-tests": "glint --project type-tests", "start": "concurrently 'npm:start:*'", "start:js": "rollup --config --watch --no-watch.clearScreen", "start:types": "glint --declaration --watch",<% } else { %> diff --git a/files/__addonLocation__/tsconfig.json b/files/__addonLocation__/tsconfig.json index 63cf81dc..7752b2b1 100644 --- a/files/__addonLocation__/tsconfig.json +++ b/files/__addonLocation__/tsconfig.json @@ -2,13 +2,12 @@ "extends": "@tsconfig/ember/tsconfig.json", "include": [ "src/**/*", - "unpublished-development-types/**/*", - "type-tests/**/*" + "unpublished-development-types/**/*" ], "glint": { "environment": "ember-loose" }, "compilerOptions": { - "declarationDir": "declarations" + "declarationDir": "declarations", } } diff --git a/files/__addonLocation__/type-tests/tsconfig.json b/files/__addonLocation__/type-tests/tsconfig.json new file mode 100644 index 00000000..97c17fea --- /dev/null +++ b/files/__addonLocation__/type-tests/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@tsconfig/ember/tsconfig.json" +} diff --git a/tests/smoke-tests/--typescript.test.ts b/tests/smoke-tests/--typescript.test.ts index 9a6c6273..6a37c1aa 100644 --- a/tests/smoke-tests/--typescript.test.ts +++ b/tests/smoke-tests/--typescript.test.ts @@ -71,11 +71,7 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) { 'unpublished-development-types', ]); - await matchesFixture(path.join(typeTests, 'index.test.ts'), { - cwd, - scenario: 'addon-only-ts', - file: 'type-tests/index.test.ts', - }); + expect(await dirContents(typeTests)).to.deep.equal(['index.test.ts', 'tsconfig.json']); }); it('builds the addon', async () => { @@ -83,8 +79,6 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) { expect(exitCode).toEqual(0); - console.log({ distDir, declarationsDir }); - let distContents = await dirContents(distDir); let declarationsContents = await dirContents(declarationsDir);