diff --git a/spec/api-ipc-spec.js b/spec/api-ipc-spec.js index e98db97107d1..0d9ba0ddeefd 100644 --- a/spec/api-ipc-spec.js +++ b/spec/api-ipc-spec.js @@ -37,7 +37,7 @@ describe('ipc module', function () { assert.equal(a.bar, 1234) assert.equal(a.anonymous.constructor.name, '') assert.equal(a.getConstructorName(Object.create(null)), '') - assert.equal(a.getConstructorName(new class {}), '') + assert.equal(a.getConstructorName(new (class {})), '') }) it('should search module from the user app', function () { diff --git a/spec/fixtures/module/no-prototype.js b/spec/fixtures/module/no-prototype.js index 4d3268199845..46cc4fe83855 100644 --- a/spec/fixtures/module/no-prototype.js +++ b/spec/fixtures/module/no-prototype.js @@ -4,7 +4,7 @@ foo.baz = false module.exports = { foo: foo, bar: 1234, - anonymous: new class {}, + anonymous: new (class {}), getConstructorName: function (value) { return value.constructor.name }