Skip to content

Commit 7772395

Browse files
committed
Actually use the typescript fixture. oops
1 parent 86296ab commit 7772395

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

files/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"include": ["src/**/*", "tests/**/*", "unpublished-development-types/**/*"],
1212
"compilerOptions": {
1313
"rootDir": ".",
14-
"types": ["ember-source/types", "vite/client", "@embroider/core/virtual"],
15-
"paths": {}
14+
"types": ["ember-source/types", "vite/client", "@embroider/core/virtual"]
1615
}
1716
}

files/tsconfig.publish.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "@ember/library-tsconfig",
3-
"include": ["src/**/*", "unpublished-development-types/**/*"],
3+
"include": ["./src/**/*", "./unpublished-development-types/**/*"],
44
"glint": {
55
"environment": ["ember-loose", "ember-template-imports"]
66
},

tests/fixtures/typescript/src/components/template-import.gts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default class TemplateImport extends Component<Signature> {
1616
<div ...attributes>
1717
Hello from a GTS file but also <AnotherGts />
1818

19-
<button {{on "click" (fn this.saySomething @saying)}}></button>
19+
<button {{on "click" (fn this.saySomething @saying)}} type="button"></button>
2020
</div>
2121
</template>
2222

tests/fixtures/typescript/tests/rendering/template-import-test.gts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ module('Rendering | template-import', function(hooks) {
1010
test('it renders', async function(assert) {
1111
await render(<template><TemplateImport @saying="what" /></template>);
1212

13-
assert.dom().hasText('Hello from a GTS file but also Hello from a template-only component and Hello from another GTS file!');
13+
assert.dom().hasText('Hello from a GTS file but also Hello from another GTS file!');
1414
})
1515
});

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {
4646
await execa({
4747
cwd: tmpDir,
4848
})`${localEmberCli} addon ${addonName} -b ${blueprintPath} --skip-npm --prefer-local true --${packageManager} --typescript`;
49-
await execa({ cwd: addonDir })`${packageManager} install`;
49+
// Have to use --force because NPM is *stricter* when you use tags in package.json
50+
// than pnpm (in that tags don't match any specified stable version)
51+
await execa({
52+
cwd: addonDir,
53+
})`${packageManager} install ${packageManager === 'npm' ? '--force' : ''}`;
5054
});
5155

5256
it('was generated correctly', async () => {
@@ -65,11 +69,8 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {
6569

6670
describe('with fixture', () => {
6771
beforeEach(async () => {
68-
let addonFixture = fixturify.readSync('./fixtures/addon');
69-
fixturify.writeSync(join(addonDir, 'src'), addonFixture);
70-
71-
let testFixture = fixturify.readSync('./fixtures/rendering-tests');
72-
fixturify.writeSync(join(addonDir, 'tests/rendering'), testFixture);
72+
let addonFixture = fixturify.readSync('./fixtures/typescript');
73+
fixturify.writeSync(addonDir, addonFixture);
7374

7475
// It's important that we ensure that dist directory is empty for these tests,
7576
// troll-y things can happen with shared dists

0 commit comments

Comments
 (0)