Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(transformer/class-properties): add static super tagged template test #7964

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tasks/transform_conformance/snapshots/oxc.snap.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
commit: 54a8389f

Passed: 112/126
Passed: 112/127

# All Passed:
* babel-plugin-transform-class-static-block
Expand All @@ -16,7 +16,10 @@ Passed: 112/126
* regexp


# babel-plugin-transform-class-properties (13/15)
# babel-plugin-transform-class-properties (13/16)
* static-super-tagged-template/input.js
x Output mismatch

* typescript/optional-call/input.ts
Symbol reference IDs mismatch for "X":
after transform: SymbolId(0): [ReferenceId(0), ReferenceId(2), ReferenceId(6), ReferenceId(11), ReferenceId(16)]
Expand Down
8 changes: 7 additions & 1 deletion tasks/transform_conformance/snapshots/oxc_exec.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ commit: 54a8389f

node: v22.12.0

Passed: 3 of 3 (100.00%)
Passed: 3 of 4 (75.00%)

Failures:

./fixtures/oxc/babel-plugin-transform-class-properties-test-fixtures-static-super-tagged-template-exec.test.js
AssertionError: expected undefined to be [Function C] // Object.is equality
at ./tasks/transform_conformance/fixtures/oxc/babel-plugin-transform-class-properties-test-fixtures-static-super-tagged-template-exec.test.js:15:17
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class S {
static method() {
return this;
}
}

class C extends S {
static prop = super.method`xyz`;
}

expect(C.prop).toBe(C);
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class S {
static method() {
return this;
}
}

class C extends S {
static prop = super.method`xyz`;
}

expect(C.prop).toBe(C);
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var _C;

class S {
static method() {
return this;
}
}

class C extends S {}
_C = C;
babelHelpers.defineProperty(C, "prop", babelHelpers.superPropGet(_C, "method", _C).bind(_C)`xyz`);

expect(C.prop).toBe(C);
Loading