From 5f47c4a6825e500fcda58650981e46d81e065820 Mon Sep 17 00:00:00 2001 From: Nils Knappmeier Date: Fri, 15 Mar 2019 22:39:36 +0100 Subject: [PATCH] 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 --- spec/security.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/spec/security.js b/spec/security.js index 45b96c34b..12b96e629 100644 --- a/spec/security.js +++ b/spec/security.js @@ -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'); });