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
This commit is contained in:
Nils Knappmeier
2019-03-15 22:39:36 +01:00
parent 4108b8330b
commit 7840ab66a5
+8 -3
View File
@@ -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');
});