Skip to content

Commit

Permalink
test(transformer): more tests for arrow function transform (#5849)
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Sep 18, 2024
1 parent 49ee1dc commit ef8dcc9
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/transform_conformance/oxc.snap.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
commit: 3bcfee23

Passed: 44/54
Passed: 46/56

# All Passed:
* babel-plugin-transform-nullish-coalescing-operator
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
let f;

class C extends (f = () => this, class {}) {}

function outer() {
class C extends (f = () => this, class {}) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var _this = this;

let f;

class C extends (
f = function() { return _this; },
class {}
) {}

function outer() {
var _this2 = this;
class C extends (
f = function() { return _this2; },
class {}
) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
let f;

class C {
[f = () => this]() {}
}

function outer() {
class C {
[f = () => this]() {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var _this = this;

let f;

class C {
[f = function() { return _this; }]() {}
}

function outer() {
var _this2 = this;
class C {
[f = function() { return _this2; }]() {}
}
}

0 comments on commit ef8dcc9

Please sign in to comment.