Add tests for bracketSpacing option

This commit is contained in:
Rogelio Guzman authored and James Long committed 2017-01-13 13:25:13 -05:00
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};
"
`;
+2
View File
@@ -0,0 +1,2 @@
const arr1 = [1,2,3,4];
const arr2 = [1, 2, 3, 4];
+3
View File
@@ -0,0 +1,3 @@
run_spec(__dirname);
run_spec(__dirname, { bracketSpacing: false });
+2
View File
@@ -0,0 +1,2 @@
const obj1 = {a:1, b:2, c:3}
const obj2 = { a:1, b:2, c:3 };