Skip to content

Remove this.compile() usage from test files#21283

Open
NullVoxPopuli-ai-agent wants to merge 1 commit intoemberjs:mainfrom
NullVoxPopuli-ai-agent:nvp/replace-compile-with-runtime-template
Open

Remove this.compile() usage from test files#21283
NullVoxPopuli-ai-agent wants to merge 1 commit intoemberjs:mainfrom
NullVoxPopuli-ai-agent:nvp/replace-compile-with-runtime-template

Conversation

@NullVoxPopuli-ai-agent
Copy link
Copy Markdown

Summary

  • Remove all this.compile() calls from test files
  • life-cycle-test.js: uses template() from @ember/template-compiler/runtime instead
  • template-factory-test.js and multiple-app-test.js: import compile directly from internal path (these need TemplateFactory)

No test files call this.compile() anymore — it's now purely an internal implementation detail of the test case base classes (used by this.render()).

Followup to #21281.

Test plan

  • All 8912 tests pass
  • Build and lint pass

🤖 Generated with Claude Code

@NullVoxPopuli-ai-agent NullVoxPopuli-ai-agent force-pushed the nvp/replace-compile-with-runtime-template branch from 04c5ba3 to 2f00902 Compare April 2, 2026 22:52
- life-cycle-test: use template() from @ember/template-compiler/runtime
  instead of this.compile() for setting component templates
- template-factory-test: import compile directly from internal path
  (this test specifically tests TemplateFactory behavior)
- multiple-app-test: import compile directly from internal path
  (registers route templates needing TemplateFactory)

No test files call this.compile() anymore — it's now purely an
internal implementation detail of the test case base classes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@NullVoxPopuli-ai-agent NullVoxPopuli-ai-agent force-pushed the nvp/replace-compile-with-runtime-template branch from 2f00902 to f644ede Compare April 2, 2026 23:04
@NullVoxPopuli
Copy link
Copy Markdown
Contributor

NullVoxPopuli commented Apr 3, 2026

We can't fully get rid of compile until we get rid of layout, which will have to wait for v8 (which we'll need to deprecate @ember/component)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants