add traceur test suite
This commit is contained in:
11
test/fixtures/traceur/Classes/ExtendNonConstructableFunction.js
vendored
Normal file
11
test/fixtures/traceur/Classes/ExtendNonConstructableFunction.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
assert.throw(function() {
|
||||
class C extends Math {}
|
||||
}, 'Super expression must either be null or a function');
|
||||
|
||||
assert.throw(function() {
|
||||
function f() {}
|
||||
// prototype needs to be an Object or null.
|
||||
f.prototype = 42;
|
||||
class C extends f {}
|
||||
}, 'super prototype must be an Object or null');
|
||||
Reference in New Issue
Block a user