From ce715f30a8d444ccbc210b61f3ccce985e555e5c Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Thu, 1 Jul 2021 17:00:25 +0800 Subject: [PATCH] Fix tests --- test/fixtures/space/one-space.js | 2 +- test/fixtures/space/two-spaces.js | 2 +- test/fixtures/typescript/child/sub-child/four-spaces.ts | 2 +- test/fixtures/typescript/two-spaces.tsx | 2 +- test/lint-text.js | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/fixtures/space/one-space.js b/test/fixtures/space/one-space.js index 0b1b5e7d..cf203662 100644 --- a/test/fixtures/space/one-space.js +++ b/test/fixtures/space/one-space.js @@ -1,3 +1,3 @@ console.log([ - 1 + 1, ]); diff --git a/test/fixtures/space/two-spaces.js b/test/fixtures/space/two-spaces.js index baa2c240..6b010f41 100644 --- a/test/fixtures/space/two-spaces.js +++ b/test/fixtures/space/two-spaces.js @@ -1,3 +1,3 @@ console.log([ - 1 + 1, ]); diff --git a/test/fixtures/typescript/child/sub-child/four-spaces.ts b/test/fixtures/typescript/child/sub-child/four-spaces.ts index 39806b0b..9b5220b1 100644 --- a/test/fixtures/typescript/child/sub-child/four-spaces.ts +++ b/test/fixtures/typescript/child/sub-child/four-spaces.ts @@ -1,3 +1,3 @@ console.log([ - 4 + 4, ]); diff --git a/test/fixtures/typescript/two-spaces.tsx b/test/fixtures/typescript/two-spaces.tsx index 70a5ead6..5984f43a 100644 --- a/test/fixtures/typescript/two-spaces.tsx +++ b/test/fixtures/typescript/two-spaces.tsx @@ -1,3 +1,3 @@ console.log([ - 2 + 2, ]); diff --git a/test/lint-text.js b/test/lint-text.js index d993cecc..615afb85 100644 --- a/test/lint-text.js +++ b/test/lint-text.js @@ -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);