packages/babel-types/test/builders/es2022/classProperty.js
raw| 1 | import * as t from "../../../lib/index.js"; |
| 2 | |
| 3 | describe("builders", function () { |
| 4 | describe("experimental", function () { |
| 5 | describe("classProperty", function () { |
| 6 | it("should validate", function () { |
| 7 | expect( |
| 8 | t.classProperty(t.stringLiteral("test"), t.numericLiteral(1)), |
| 9 | ).toMatchSnapshot(); |
| 10 | |
| 11 | expect( |
| 12 | t.classProperty( |
| 13 | t.stringLiteral("test"), |
| 14 | t.numericLiteral(1), |
| 15 | null, |
| 16 | null, |
| 17 | false, |
| 18 | true, |
| 19 | ), |
| 20 | ).toMatchSnapshot(); |
| 21 | }); |
| 22 | }); |
| 23 | }); |
| 24 | }); |