Skip to content

Commit bffaf36

Browse files
committed
Restore unrelated upstream test formatting
1 parent f105de1 commit bffaf36

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

‎eslint-local-rules/__tests__/lint-markdown-code-blocks.test.js‎

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ const path = require('path');
1111
const {ESLint} = require('eslint');
1212
const plugin = require('..');
1313

14-
const FIXTURES_DIR = path.join(__dirname, 'fixtures', 'src', 'content');
14+
const FIXTURES_DIR = path.join(
15+
__dirname,
16+
'fixtures',
17+
'src',
18+
'content'
19+
);
1520
const PARSER_PATH = path.join(__dirname, '..', 'parser.js');
1621

1722
function createESLint({fix = false} = {}) {
@@ -48,7 +53,11 @@ async function lintFixture(name, {fix = false} = {}) {
4853

4954
async function run() {
5055
const basicResult = await lintFixture('basic-error.md');
51-
assert.strictEqual(basicResult.messages.length, 1, 'expected one diagnostic');
56+
assert.strictEqual(
57+
basicResult.messages.length,
58+
1,
59+
'expected one diagnostic'
60+
);
5261
assert(
5362
basicResult.messages[0].message.includes('Calling setState during render'),
5463
'expected message to mention setState during render'
@@ -82,7 +91,9 @@ async function run() {
8291
fix: true,
8392
});
8493
assert(
85-
duplicateFixed.output.includes("{expectedErrors: {'react-compiler': [4]}}"),
94+
duplicateFixed.output.includes(
95+
"{expectedErrors: {'react-compiler': [4]}}"
96+
),
8697
'expected duplicates to be rewritten to a single canonical block'
8798
);
8899
assert(
@@ -107,7 +118,9 @@ async function run() {
107118
fix: true,
108119
});
109120
assert(
110-
malformedFixed.output.includes("{expectedErrors: {'react-compiler': [4]}}"),
121+
malformedFixed.output.includes(
122+
"{expectedErrors: {'react-compiler': [4]}}"
123+
),
111124
'expected malformed metadata to be replaced with canonical form'
112125
);
113126

@@ -143,7 +156,7 @@ async function run() {
143156
);
144157
}
145158

146-
run().catch((error) => {
159+
run().catch(error => {
147160
console.error(error);
148161
process.exitCode = 1;
149162
});

0 commit comments

Comments
 (0)