Skip to content

Commit

Permalink
make another test agnostic to class renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
ef4 committed Apr 27, 2024
1 parent 0ee3f49 commit e034696
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -364,18 +364,21 @@ moduleFor(
}

['@test gives helpful assertion when a tracked property is mutated after access in with an autotracking transaction']() {
class EmberObject {
class MyObject {
@tracked value;
toString() {
return 'MyObject';
}
}

let obj = new EmberObject();
let obj = new MyObject();

expectAssertion(() => {
track(() => {
obj.value;
obj.value = 123;
});
}, /You attempted to update `value` on `_?EmberObject`, but it had already been used previously in the same computation/);
}, /You attempted to update `value` on `MyObject`, but it had already been used previously in the same computation/);
}

['@test get() does not entangle in the autotracking stack until after retrieving the value'](
Expand Down

0 comments on commit e034696

Please sign in to comment.