ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

Add some TS component blueprint tests

Open Windvis opened this issue 1 year ago • 1 comments

While looking into #20511 I noticed there weren't any tests for the --typescript version of the blueprints.

This adds a some ts tests for the component blueprint. We can add tests for other blueprint in follow up PRs.

I included a pnpm patch for the ember-cli/ember-cli-blueprint-test-helpers package since it doesn't accept any extra cli arguments for ember new in its current state: https://github.com/ember-cli/ember-cli-blueprint-test-helpers/issues/391

This also fixes a bug where ember g component foo.ts would generate .ts.hbs files since .ts wasn't normalized yet.

Partially solves: https://github.com/emberjs/ember.js/issues/20362

Windvis avatar Oct 05 '24 12:10 Windvis

Hmm, I think CI isn't using the pnpm patch. It does seem to work locally, so not sure what I did wrong. :thinking:

Edit: Ah no, I forgot about the blueprint tests that mimic the scenario where .ts can't be transpiled (so the blueprints-js folder is used instead).

Windvis avatar Oct 05 '24 13:10 Windvis

Do you have a pr for the test-helpers as well?

~~No, what test-helpers do you mean?~~

Sorry, It seems I'm a bit slow after a 2 week holiday :sweat_smile: I haven't created a PR yet no, I can open one if the patch in this PR seems ok.

Windvis avatar Nov 04 '24 12:11 Windvis

@NullVoxPopuli Is creating a PR in the helpers repo and getting that merged / released a blocker for this one, or can we merge with the patch? That repo doesn't seem to be maintained and it has no Github actions setup either. I don't really have the time to get that repo in a good state so PRs can be merged I'm afraid.

Other than that I think I should split off the .ts.ts fix into a separate one (and fix it for all the .ts blueprints at the same time maybe?), and resolve the merge conflicts, but then this should be good to go.

Windvis avatar Nov 13 '24 09:11 Windvis

Going to close this since it's outdated and we can just use --typescript where needed.

Windvis avatar Mar 14 '25 15:03 Windvis