added tests for var

This commit is contained in:
Shubheksha Jalan 2017-01-24 15:09:17 +05:30
parent d91d17f2cf
commit bd5fd5a886
1 changed files with 18 additions and 0 deletions

View File

@ -85,6 +85,16 @@ describe("Parser", () => {
fgh.sub;
}, {}
],
"var definition": [
function() {
let abc, cde, fgh;
abc("test");
cde.abc("test");
cde.ddd.abc("test");
fgh;
fgh.sub;
}, {}
],
"function definition": [
function() {
function abc() {}
@ -126,6 +136,14 @@ describe("Parser", () => {
abc: ["test"]
}
],
"renaming with var": [
function() {
const xyz = abc;
xyz("test");
}, {
abc: ["test"]
}
],
"renaming with assignment": [
function() {
const xyz = abc;