Skip to content

Commit 5e527d1

Browse files
committed
add test
1 parent 3c2ae69 commit 5e527d1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,20 @@ describe("test", () => {
7878
it("include import path", () => {
7979
expect(nodeJsTypeScriptCode).toMatch(importPath);
8080
});
81+
it("not include revered word", () => {
82+
const nodeJsCode = {
83+
exportTypeAliasList: [],
84+
exportVariableList: [
85+
{
86+
name: "new",
87+
document: "newという名前の変数",
88+
typeExpr: typeExpr.typeString,
89+
expr: main.stringLiteral("newData")
90+
}
91+
]
92+
};
93+
expect(() => {
94+
main.toNodeJsCodeAsTypeScript(nodeJsCode);
95+
}).toThrow();
96+
});
8197
});

0 commit comments

Comments
 (0)