Skip to content

Commit

Permalink
Merge pull request #19694 from emberjs/kg-add-native-proxy-guard
Browse files Browse the repository at this point in the history
Add `HAS_NATIVE_PROXY` guard to test
  • Loading branch information
kategengler authored Aug 2, 2021
2 parents 8a4e4af + cf4ccb6 commit 5365a3c
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,15 @@ moduleFor(
this.assertText('Chad Hietala');

runTask(() => {
expectDeprecation(() => {
if (HAS_NATIVE_PROXY) {
expectDeprecation(() => {
set(fooBarInstance.hash, 'firstName', 'Godfrey');
set(fooBarInstance.hash, 'lastName', 'Chan');
}, /You set the '.*' property on a {{hash}} object/);
} else {
set(fooBarInstance.hash, 'firstName', 'Godfrey');
set(fooBarInstance.hash, 'lastName', 'Chan');
}, /You set the '.*' property on a {{hash}} object/);
}
});

this.assertText('Godfrey Chan');
Expand Down

0 comments on commit 5365a3c

Please sign in to comment.