Skip to content

Commit

Permalink
chore(transformer): enable Babel's private-property-in-property plugi…
Browse files Browse the repository at this point in the history
…n tests
  • Loading branch information
Dunqing committed Dec 31, 2024
1 parent 81a5e20 commit f6ea574
Show file tree
Hide file tree
Showing 3 changed files with 218 additions and 3 deletions.
181 changes: 180 additions & 1 deletion tasks/transform_conformance/snapshots/babel.snap.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
commit: 54a8389f

Passed: 661/1095
Passed: 661/1154

# All Passed:
* babel-plugin-transform-logical-assignment-operators
Expand Down Expand Up @@ -811,6 +811,185 @@ x Output mismatch
x Output mismatch


# babel-plugin-transform-private-property-in-object (0/59)
* assumption-privateFieldsAsProperties/accessor/input.js
x Output mismatch

* assumption-privateFieldsAsProperties/compiled-classes/input.js
x Output mismatch

* assumption-privateFieldsAsProperties/field/input.js
x Output mismatch

* assumption-privateFieldsAsProperties/method/input.js
x Output mismatch

* assumption-privateFieldsAsProperties/nested-class/input.js
x Output mismatch

* assumption-privateFieldsAsProperties/nested-class-other-redeclared/input.js
x Output mismatch

* assumption-privateFieldsAsProperties/nested-class-redeclared/input.js
x Output mismatch

* assumption-privateFieldsAsProperties/static-accessor/input.js
x Output mismatch

* assumption-privateFieldsAsProperties/static-field/input.js
x Output mismatch

* assumption-privateFieldsAsProperties/static-method/input.js
x Output mismatch

* assumption-privateFieldsAsSymbols/accessor/input.js
x Output mismatch

* assumption-privateFieldsAsSymbols/compiled-classes/input.js
x Output mismatch

* assumption-privateFieldsAsSymbols/field/input.js
x Output mismatch

* assumption-privateFieldsAsSymbols/method/input.js
x Output mismatch

* assumption-privateFieldsAsSymbols/nested-class/input.js
x Output mismatch

* assumption-privateFieldsAsSymbols/nested-class-other-redeclared/input.js
x Output mismatch

* assumption-privateFieldsAsSymbols/nested-class-redeclared/input.js
x Output mismatch

* assumption-privateFieldsAsSymbols/static-accessor/input.js
x Output mismatch

* assumption-privateFieldsAsSymbols/static-field/input.js
x Output mismatch

* assumption-privateFieldsAsSymbols/static-method/input.js
x Output mismatch

* private/accessor/input.js
x Output mismatch

* private/field/input.js
x Output mismatch

* private/method/input.js
x Output mismatch

* private/native-classes/input.js
x Output mismatch

* private/nested-class/input.js
x Output mismatch

* private/nested-class-other-redeclared/input.js
x Output mismatch

* private/nested-class-redeclared/input.js
x Output mismatch

* private/static-accessor/input.js
x Output mismatch

* private/static-field/input.js
x Output mismatch

* private/static-method/input.js
x Output mismatch

* private/static-shadow/input.js
x Output mismatch

* private-loose/accessor/input.js
x Output mismatch

* private-loose/field/input.js
x Output mismatch

* private-loose/method/input.js
x Output mismatch

* private-loose/native-classes/input.js
x Output mismatch

* private-loose/nested-class/input.js
x Output mismatch

* private-loose/nested-class-other-redeclared/input.js
x Output mismatch

* private-loose/nested-class-redeclared/input.js
x Output mismatch

* private-loose/static-accessor/input.js
x Output mismatch

* private-loose/static-field/input.js
x Output mismatch

* private-loose/static-method/input.js
x Output mismatch

* private-loose/static-shadow/input.js
x Output mismatch

* to-native-fields/accessor/input.js
x Output mismatch

* to-native-fields/class-expression-in-default-param/input.js
x Output mismatch

* to-native-fields/class-expression-instance/input.js
x Output mismatch

* to-native-fields/class-expression-static/input.js
x Output mismatch

* to-native-fields/field/input.js
x Output mismatch

* to-native-fields/half-constructed-instance/input.js
x Output mismatch

* to-native-fields/half-constructed-static/input.js
x Output mismatch

* to-native-fields/method/input.js
x Output mismatch

* to-native-fields/multiple-checks/input.js
x Output mismatch

* to-native-fields/nested-class/input.js
x Output mismatch

* to-native-fields/nested-class-other-redeclared/input.js
x Output mismatch

* to-native-fields/nested-class-redeclared/input.js
x Output mismatch

* to-native-fields/static-accessor/input.js
x Output mismatch

* to-native-fields/static-field/input.js
x Output mismatch

* to-native-fields/static-method/input.js
x Output mismatch

* to-native-fields/static-shadow/input.js
x Output mismatch

* to-native-fields/static-shadowed-binding/input.js
x Output mismatch


# babel-plugin-transform-nullish-coalescing-operator (5/12)
* assumption-noDocumentAll/transform/input.js
x Output mismatch
Expand Down
38 changes: 37 additions & 1 deletion tasks/transform_conformance/snapshots/babel_exec.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ commit: 54a8389f

node: v22.12.0

Passed: 283 of 362 (78.18%)
Passed: 283 of 374 (75.67%)

Failures:

Expand Down Expand Up @@ -414,6 +414,42 @@ TypeError: "#privateStaticFieldValue" is write-only
at Function.getPrivateStaticFieldValue (./tasks/transform_conformance/fixtures/babel/babel-plugin-transform-private-methods-test-fixtures-static-accessors-privateFieldsAsSymbols-get-only-setter-exec.test.js:7:15)
at ./tasks/transform_conformance/fixtures/babel/babel-plugin-transform-private-methods-test-fixtures-static-accessors-privateFieldsAsSymbols-get-only-setter-exec.test.js:14:12

./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-assumption-privateFieldsAsProperties-method-exec.test.js
Private field '#foo' must be declared in an enclosing class

./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-assumption-privateFieldsAsProperties-rhs-not-object-exec.test.js
Private field '#p' must be declared in an enclosing class

./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-assumption-privateFieldsAsSymbols-method-exec.test.js
Private field '#foo' must be declared in an enclosing class

./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-assumption-privateFieldsAsSymbols-rhs-not-object-exec.test.js
Private field '#p' must be declared in an enclosing class

./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-private-loose-rhs-not-object-exec.test.js
Private field '#p' must be declared in an enclosing class

./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-private-loose-static-shadow-exec.test.js
Private field '#x' must be declared in an enclosing class

./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-private-rhs-not-object-exec.test.js
Private field '#p' must be declared in an enclosing class

./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-private-static-shadow-exec.test.js
Private field '#x' must be declared in an enclosing class

./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-to-native-fields-half-constructed-instance-exec.test.js
Private field '#w' must be declared in an enclosing class

./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-to-native-fields-half-constructed-static-exec.test.js
Private field '#w' must be declared in an enclosing class

./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-to-native-fields-rhs-not-object-exec.test.js
Private field '#p' must be declared in an enclosing class

./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-to-native-fields-static-shadow-exec.test.js
Private field '#x' must be declared in an enclosing class

./fixtures/babel/babel-preset-env-test-fixtures-plugins-integration-issue-15170-exec.test.js
AssertionError: expected [Function] to not throw an error but 'ReferenceError: x is not defined' was thrown
at Proxy.<anonymous> (./node_modules/.pnpm/@vitest[email protected]/node_modules/@vitest/expect/dist/index.js:1438:21)
Expand Down
2 changes: 1 addition & 1 deletion tasks/transform_conformance/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub const PLUGINS: &[&str] = &[
"babel-plugin-transform-class-properties",
"babel-plugin-transform-class-static-block",
"babel-plugin-transform-private-methods",
// "babel-plugin-transform-private-property-in-object",
"babel-plugin-transform-private-property-in-object",
// // [Syntax] "babel-plugin-transform-syntax-top-level-await",
// ES2021
"babel-plugin-transform-logical-assignment-operators",
Expand Down

0 comments on commit f6ea574

Please sign in to comment.