Skip to content

Commit bd5fd5a

Browse files
committed
added tests for var
1 parent d91d17f commit bd5fd5a

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎test/Parser.test.js‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ describe("Parser", () => {
8585
fgh.sub;
8686
}, {}
8787
],
88+
"var definition": [
89+
function() {
90+
let abc, cde, fgh;
91+
abc("test");
92+
cde.abc("test");
93+
cde.ddd.abc("test");
94+
fgh;
95+
fgh.sub;
96+
}, {}
97+
],
8898
"function definition": [
8999
function() {
90100
function abc() {}
@@ -126,6 +136,14 @@ describe("Parser", () => {
126136
abc: ["test"]
127137
}
128138
],
139+
"renaming with var": [
140+
function() {
141+
const xyz = abc;
142+
xyz("test");
143+
}, {
144+
abc: ["test"]
145+
}
146+
],
129147
"renaming with assignment": [
130148
function() {
131149
const xyz = abc;

0 commit comments

Comments
 (0)