Skip to content

Commit 5f47c4a

Browse files
committed
test: make security testcase internet explorer compatible
Internet Explorer does not support the 'class Testclass {}' notation, and tests are not compiled using babel. closes #1497
1 parent 7c2fbcc commit 5f47c4a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

spec/security.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@ describe('security issues', function() {
1111
});
1212

1313
it('should allow prototype properties that are not constructors', function() {
14-
class TestClass {
15-
get abc() {
14+
function TestClass() {
15+
}
16+
17+
Object.defineProperty(TestClass.prototype, 'abc', {
18+
get: function() {
1619
return 'xyz';
1720
}
18-
}
21+
22+
});
23+
1924
shouldCompileTo('{{#with this as |obj|}}{{obj.abc}}{{/with}}',
2025
new TestClass(), 'xyz');
2126
});

0 commit comments

Comments
 (0)