Add tests for bracketSpacing option
This commit is contained in:
1 parent
3e0ac6c18e
commit
e54b9806a3
4 files changed
+42
No files matched your search
@@ -0,0 +1,35 @@
|
||||
exports[`test array.js 1`] = `
|
||||
"const arr1 = [1,2,3,4];
|
||||
const arr2 = [1, 2, 3, 4];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const arr1 = [ 1, 2, 3, 4 ];
|
||||
const arr2 = [ 1, 2, 3, 4 ];
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test array.js 2`] = `
|
||||
"const arr1 = [1,2,3,4];
|
||||
const arr2 = [1, 2, 3, 4];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const arr1 = [1, 2, 3, 4];
|
||||
const arr2 = [1, 2, 3, 4];
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test object.js 1`] = `
|
||||
"const obj1 = {a:1, b:2, c:3}
|
||||
const obj2 = { a:1, b:2, c:3 };
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const obj1 = { a: 1, b: 2, c: 3 };
|
||||
const obj2 = { a: 1, b: 2, c: 3 };
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test object.js 2`] = `
|
||||
"const obj1 = {a:1, b:2, c:3}
|
||||
const obj2 = { a:1, b:2, c:3 };
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const obj1 = {a: 1, b: 2, c: 3};
|
||||
const obj2 = {a: 1, b: 2, c: 3};
|
||||
"
|
||||
`;
|
||||
@@ -0,0 +1,2 @@
|
||||
const arr1 = [1,2,3,4];
|
||||
const arr2 = [1, 2, 3, 4];
|
||||
@@ -0,0 +1,3 @@
|
||||
run_spec(__dirname);
|
||||
|
||||
run_spec(__dirname, { bracketSpacing: false });
|
||||
@@ -0,0 +1,2 @@
|
||||
const obj1 = {a:1, b:2, c:3}
|
||||
const obj2 = { a:1, b:2, c:3 };
|
||||
Reference in new issue
Block a user