Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Mar 28, 2022
1 parent 19a5392 commit 34fb84c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/babel-types/test/validators.js
Expand Up @@ -266,6 +266,20 @@ describe("validators", function () {
});
});

describe("ClassDeclaration", () => {
it("returns true if node is a class heritage", function () {
const node = t.identifier("A");
const parent = t.classDeclaration(
t.identifier("C"),
node,
t.classBody([]),
[],
);

expect(t.isReferenced(node, parent)).toBe(true);
});
});

describe("exports", function () {
it("returns false for re-exports", function () {
const node = t.identifier("foo");
Expand Down

0 comments on commit 34fb84c

Please sign in to comment.