rename syntax tests to transformation
This commit is contained in:
11
test/fixtures/transformation/classes/constructor/actual.js
vendored
Normal file
11
test/fixtures/transformation/classes/constructor/actual.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
class Test {
|
||||
constructor() {
|
||||
this.state = "test";
|
||||
}
|
||||
}
|
||||
|
||||
class Foo extends Bar {
|
||||
constructor() {
|
||||
this.state = "test";
|
||||
}
|
||||
}
|
||||
32
test/fixtures/transformation/classes/constructor/expected.js
vendored
Normal file
32
test/fixtures/transformation/classes/constructor/expected.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
child.prototype = Object.create(parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
var Test = function() {
|
||||
var Test = function Test() {
|
||||
this.state = "test";
|
||||
};
|
||||
|
||||
return Test;
|
||||
}();
|
||||
|
||||
var Foo = function(Bar) {
|
||||
var Foo = function Foo() {
|
||||
this.state = "test";
|
||||
};
|
||||
|
||||
_extends(Foo, Bar);
|
||||
|
||||
return Foo;
|
||||
}(Bar);
|
||||
Reference in New Issue
Block a user