Skip to content

Commit

Permalink
test: make security testcase internet explorer compatible
Browse files Browse the repository at this point in the history
Internet Explorer does not support the 'class Testclass {}' notation,
and tests are not compiled using babel.

closes #1497
  • Loading branch information
nknapp committed Mar 15, 2019
1 parent 7c2fbcc commit 5f47c4a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions spec/security.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ describe('security issues', function() {
});

it('should allow prototype properties that are not constructors', function() {
class TestClass {
get abc() {
function TestClass() {
}

Object.defineProperty(TestClass.prototype, 'abc', {
get: function() {
return 'xyz';
}
}

});

shouldCompileTo('{{#with this as |obj|}}{{obj.abc}}{{/with}}',
new TestClass(), 'xyz');
});
Expand Down

0 comments on commit 5f47c4a

Please sign in to comment.