Skip to content

Commit 7126906

Browse files
moonglumFND
authored andcommitted
updated expected transpilation results
1 parent bd439f7 commit 7126906

File tree

4 files changed

+16
-100
lines changed

4 files changed

+16
-100
lines changed

test/cli/test_browserslist/expected_legacy.js

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,10 @@
1-
function _classCallCheck(instance, Constructor) {
2-
if (!(instance instanceof Constructor)) {
3-
throw new TypeError("Cannot call a class as a function");
4-
}
1+
function _classCallCheck(a, n) {
2+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
53
}
6-
function _defineProperties(target, props) {
7-
for (var i = 0; i < props.length; i++) {
8-
var descriptor = props[i];
9-
descriptor.enumerable = descriptor.enumerable || false;
10-
descriptor.configurable = true;
11-
if ("value" in descriptor) descriptor.writable = true;
12-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
13-
}
14-
}
15-
function _createClass(Constructor, protoProps, staticProps) {
16-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
17-
if (staticProps) _defineProperties(Constructor, staticProps);
18-
Object.defineProperty(Constructor, "prototype", {
4+
function _createClass(e, r, t) {
5+
return Object.defineProperty(e, "prototype", {
196
writable: false
20-
});
21-
return Constructor;
22-
}
23-
function _toPrimitive(input, hint) {
24-
if (typeof input !== "object" || input === null) return input;
25-
var prim = input[Symbol.toPrimitive];
26-
if (prim !== undefined) {
27-
var res = prim.call(input, hint || "default");
28-
if (typeof res !== "object") return res;
29-
throw new TypeError("@@toPrimitive must return a primitive value.");
30-
}
31-
return (hint === "string" ? String : Number)(input);
32-
}
33-
function _toPropertyKey(arg) {
34-
var key = _toPrimitive(arg, "string");
35-
return typeof key === "symbol" ? key : String(key);
7+
}), e;
368
}
379

3810
var Util = /*#__PURE__*/_createClass(function Util() {

test/cli/test_jsx/expected.js

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,10 @@
1-
function _classCallCheck(instance, Constructor) {
2-
if (!(instance instanceof Constructor)) {
3-
throw new TypeError("Cannot call a class as a function");
4-
}
1+
function _classCallCheck(a, n) {
2+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
53
}
6-
function _defineProperties(target, props) {
7-
for (var i = 0; i < props.length; i++) {
8-
var descriptor = props[i];
9-
descriptor.enumerable = descriptor.enumerable || false;
10-
descriptor.configurable = true;
11-
if ("value" in descriptor) descriptor.writable = true;
12-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
13-
}
14-
}
15-
function _createClass(Constructor, protoProps, staticProps) {
16-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
17-
if (staticProps) _defineProperties(Constructor, staticProps);
18-
Object.defineProperty(Constructor, "prototype", {
4+
function _createClass(e, r, t) {
5+
return Object.defineProperty(e, "prototype", {
196
writable: false
20-
});
21-
return Constructor;
22-
}
23-
function _toPrimitive(input, hint) {
24-
if (typeof input !== "object" || input === null) return input;
25-
var prim = input[Symbol.toPrimitive];
26-
if (prim !== undefined) {
27-
var res = prim.call(input, hint || "default");
28-
if (typeof res !== "object") return res;
29-
throw new TypeError("@@toPrimitive must return a primitive value.");
30-
}
31-
return (hint === "string" ? String : Number)(input);
32-
}
33-
function _toPropertyKey(arg) {
34-
var key = _toPrimitive(arg, "string");
35-
return typeof key === "symbol" ? key : String(key);
7+
}), e;
368
}
379

3810
var MyComponent = /*#__PURE__*/_createClass(function MyComponent() {

test/cli/test_sourcemap/expected.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/cli/test_transpilation/expected.js

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,10 @@
1-
function _classCallCheck(instance, Constructor) {
2-
if (!(instance instanceof Constructor)) {
3-
throw new TypeError("Cannot call a class as a function");
4-
}
1+
function _classCallCheck(a, n) {
2+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
53
}
6-
function _defineProperties(target, props) {
7-
for (var i = 0; i < props.length; i++) {
8-
var descriptor = props[i];
9-
descriptor.enumerable = descriptor.enumerable || false;
10-
descriptor.configurable = true;
11-
if ("value" in descriptor) descriptor.writable = true;
12-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
13-
}
14-
}
15-
function _createClass(Constructor, protoProps, staticProps) {
16-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
17-
if (staticProps) _defineProperties(Constructor, staticProps);
18-
Object.defineProperty(Constructor, "prototype", {
4+
function _createClass(e, r, t) {
5+
return Object.defineProperty(e, "prototype", {
196
writable: false
20-
});
21-
return Constructor;
22-
}
23-
function _toPrimitive(input, hint) {
24-
if (typeof input !== "object" || input === null) return input;
25-
var prim = input[Symbol.toPrimitive];
26-
if (prim !== undefined) {
27-
var res = prim.call(input, hint || "default");
28-
if (typeof res !== "object") return res;
29-
throw new TypeError("@@toPrimitive must return a primitive value.");
30-
}
31-
return (hint === "string" ? String : Number)(input);
32-
}
33-
function _toPropertyKey(arg) {
34-
var key = _toPrimitive(arg, "string");
35-
return typeof key === "symbol" ? key : String(key);
7+
}), e;
368
}
379

3810
var Util = /*#__PURE__*/_createClass(function Util() {

0 commit comments

Comments
 (0)