diff --git a/packages/@glimmer-workspace/integration-tests/lib/suites/components.ts b/packages/@glimmer-workspace/integration-tests/lib/suites/components.ts
index 3c6426e1d..2a2dcd8de 100644
--- a/packages/@glimmer-workspace/integration-tests/lib/suites/components.ts
+++ b/packages/@glimmer-workspace/integration-tests/lib/suites/components.ts
@@ -864,41 +864,45 @@ export class GlimmerishComponents extends RenderTest {
}
@test({ kind: 'glimmer' }) 'destruction is not autotracked'() {
- let fooCount = 0;
- class Foo extends GlimmerishComponent {
- declare args: { exclaim: string };
-
- constructor(owner: Owner, args: Dict) {
- super(owner, args);
- }
-
- @tracked hello = 'hello';
-
- get foo() {
- fooCount++;
- return this.hello + this.args.exclaim;
+ class State {
+ @tracked willDestroyCalls = 0;
+ increment = () => this.willDestroyCalls++;
+ }
+ let state = new State();
+ class Child extends GlimmerishComponent {
+ declare args: { incrementWillDestroy: () => void };
+ override willDestroy() {
+ super.willDestroy();
+ this.args.incrementWillDestroy();
}
}
- this.registerComponent('Glimmer', 'Foo', '{{this.foo}}', Foo);
-
- this.render('{{#if this.showing}}
willDestroyCalls: {{@willDestroyCalls}}
+ - this.rerender({ exclaim: '!' }); - this.assert.strictEqual(fooCount, 2); + {{#if this.showChild}} +