Skip to content

Commit 559affc

Browse files
committed
test: fix prettier formatting in migrated test files
1 parent 7e8f10c commit 559affc

2 files changed

Lines changed: 21 additions & 22 deletions

File tree

packages/data-uri/test/test.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ test('bad json', async () => {
3535
input: 'bad-json.js',
3636
plugins: [dataUri()]
3737
});
38-
const error = await fn().then(() => null, (caught) => caught);
38+
const error = await fn().then(
39+
() => null,
40+
(caught) => caught
41+
);
3942
expect(error).not.toBeNull();
4043
const { code, plugin, pluginCode } = error;
4144
expect({ code, plugin, pluginCode }).toMatchSnapshot();

packages/eslint/test/test.mjs

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -206,28 +206,24 @@ test('works with cjs plugin', async () => {
206206
expect(count).toBe(1);
207207
});
208208

209-
test(
210-
'works with flat config',
211-
async () => {
212-
let count = 0;
213-
await rollup({
214-
input: './test/fixtures/flat-config/undeclared.js',
215-
plugins: [
216-
eslint({
217-
formatter: (results) => {
218-
count += results[0].messages.length;
219-
// eslint-disable-next-line prefer-destructuring
220-
const { message } = results[0].messages[0];
221-
expect(message).toBe("'x' is not defined.");
222-
}
223-
})
224-
]
225-
});
209+
test('works with flat config', async () => {
210+
let count = 0;
211+
await rollup({
212+
input: './test/fixtures/flat-config/undeclared.js',
213+
plugins: [
214+
eslint({
215+
formatter: (results) => {
216+
count += results[0].messages.length;
217+
// eslint-disable-next-line prefer-destructuring
218+
const { message } = results[0].messages[0];
219+
expect(message).toBe("'x' is not defined.");
220+
}
221+
})
222+
]
223+
});
226224

227-
expect(count).toBe(1);
228-
},
229-
15_000
230-
);
225+
expect(count).toBe(1);
226+
}, 15_000);
231227

232228
test('works with ESLint v9', async () => {
233229
// Load the plugin with an override to route 'eslint' imports to ESLint v9

0 commit comments

Comments
 (0)