Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Jul 1, 2021
1 parent 0b67cc6 commit ce715f3
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/space/one-space.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
console.log([
1
1,
]);
2 changes: 1 addition & 1 deletion test/fixtures/space/two-spaces.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
console.log([
1
1,
]);
2 changes: 1 addition & 1 deletion test/fixtures/typescript/child/sub-child/four-spaces.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
console.log([
4
4,
]);
2 changes: 1 addition & 1 deletion test/fixtures/typescript/two-spaces.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
console.log([
2
2,
]);
8 changes: 4 additions & 4 deletions test/lint-text.js
Original file line number Diff line number Diff line change
@@ -278,14 +278,14 @@ test('find configurations close to linted file', async t => {

test('typescript files', async t => {
let {results} = await xo.lintText(`console.log([
2
2,
]);
`, {filePath: 'fixtures/typescript/two-spaces.tsx'});

t.true(hasRule(results, '@typescript-eslint/indent'));

({results} = await xo.lintText(`console.log([
2
2,
]);
`, {filePath: 'fixtures/typescript/two-spaces.tsx', space: 2}));
t.is(results[0].errorCount, 0);
@@ -297,13 +297,13 @@ test('typescript files', async t => {
t.is(results[0].errorCount, 0);

({results} = await xo.lintText(`console.log([
4
4,
]);
`, {filePath: 'fixtures/typescript/child/sub-child/four-spaces.ts'}));
t.true(hasRule(results, '@typescript-eslint/indent'));

({results} = await xo.lintText(`console.log([
4
4,
]);
`, {filePath: 'fixtures/typescript/child/sub-child/four-spaces.ts', space: 4}));
t.is(results[0].errorCount, 0);

0 comments on commit ce715f3

Please sign in to comment.