Add tests for tabWiths option
parent
7f9655e186
commit
63c87b6cd0
|
@ -0,0 +1,105 @@
|
|||
exports[`test class.js 1`] = `
|
||||
"class A {
|
||||
method() {
|
||||
var x = 1;
|
||||
while(typeof x == \"number\" || typeof x == \"string\") {
|
||||
x = x + 1;
|
||||
if (true) x = \"\";
|
||||
}
|
||||
var z:number = x;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
class A {
|
||||
method() {
|
||||
var x = 1;
|
||||
while (typeof x == \"number\" || typeof x == \"string\") {
|
||||
x = x + 1;
|
||||
if (true)
|
||||
x = \"\";
|
||||
}
|
||||
var z: number = x;
|
||||
}
|
||||
}
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test class.js 2`] = `
|
||||
"class A {
|
||||
method() {
|
||||
var x = 1;
|
||||
while(typeof x == \"number\" || typeof x == \"string\") {
|
||||
x = x + 1;
|
||||
if (true) x = \"\";
|
||||
}
|
||||
var z:number = x;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
class A {
|
||||
method() {
|
||||
var x = 1;
|
||||
while (typeof x == \"number\" || typeof x == \"string\") {
|
||||
x = x + 1;
|
||||
if (true)
|
||||
x = \"\";
|
||||
}
|
||||
var z: number = x;
|
||||
}
|
||||
}
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test nested-functions.spec.js 1`] = `
|
||||
"const c = () => {};
|
||||
|
||||
function a() {
|
||||
return function b() {
|
||||
return () => {
|
||||
return function() {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const c = () => {};
|
||||
|
||||
function a() {
|
||||
return function b() {
|
||||
return () => {
|
||||
return function() {
|
||||
return c;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test nested-functions.spec.js 2`] = `
|
||||
"const c = () => {};
|
||||
|
||||
function a() {
|
||||
return function b() {
|
||||
return () => {
|
||||
return function() {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const c = () => {};
|
||||
|
||||
function a() {
|
||||
return function b() {
|
||||
return () => {
|
||||
return function() {
|
||||
return c;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
"
|
||||
`;
|
|
@ -0,0 +1,10 @@
|
|||
class A {
|
||||
method() {
|
||||
var x = 1;
|
||||
while(typeof x == "number" || typeof x == "string") {
|
||||
x = x + 1;
|
||||
if (true) x = "";
|
||||
}
|
||||
var z:number = x;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
run_spec(__dirname);
|
||||
|
||||
run_spec(__dirname, { tabWidth: 4 });
|
|
@ -0,0 +1,11 @@
|
|||
const c = () => {};
|
||||
|
||||
function a() {
|
||||
return function b() {
|
||||
return () => {
|
||||
return function() {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue