Skip to content

Commit 681ca46

Browse files
committed
Fix destructuring order in validateFiles tests
Swap validPaths/invalidPaths destructuring to be alphabetically sorted to satisfy ESLint sort-destructure-keys rule.
1 parent aaf17a4 commit 681ca46

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/fs.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ describe('fs', () => {
12081208
await fs.writeFile(file1, '{}', 'utf8')
12091209
await fs.writeFile(file2, '{}', 'utf8')
12101210

1211-
const { validPaths, invalidPaths } = validateFiles([file1, file2])
1211+
const { invalidPaths, validPaths } = validateFiles([file1, file2])
12121212

12131213
expect(validPaths).toHaveLength(2)
12141214
expect(validPaths).toContain(file1)
@@ -1223,7 +1223,7 @@ describe('fs', () => {
12231223
const nonExistentFile = path.join(tmpDir, 'does-not-exist.json')
12241224
await fs.writeFile(existingFile, '{}', 'utf8')
12251225

1226-
const { validPaths, invalidPaths } = validateFiles([
1226+
const { invalidPaths, validPaths } = validateFiles([
12271227
existingFile,
12281228
nonExistentFile,
12291229
])
@@ -1240,7 +1240,7 @@ describe('fs', () => {
12401240
const file1 = path.join(tmpDir, 'missing1.json')
12411241
const file2 = path.join(tmpDir, 'missing2.json')
12421242

1243-
const { validPaths, invalidPaths } = validateFiles([file1, file2])
1243+
const { invalidPaths, validPaths } = validateFiles([file1, file2])
12441244

12451245
expect(validPaths).toHaveLength(0)
12461246
expect(invalidPaths).toHaveLength(2)
@@ -1250,7 +1250,7 @@ describe('fs', () => {
12501250
})
12511251

12521252
it('should handle empty file array', () => {
1253-
const { validPaths, invalidPaths } = validateFiles([])
1253+
const { invalidPaths, validPaths } = validateFiles([])
12541254

12551255
expect(validPaths).toHaveLength(0)
12561256
expect(invalidPaths).toHaveLength(0)
@@ -1262,7 +1262,7 @@ describe('fs', () => {
12621262
await fs.writeFile(file1, '{}', 'utf8')
12631263

12641264
const readonlyArray: readonly string[] = [file1] as const
1265-
const { validPaths, invalidPaths } = validateFiles(readonlyArray)
1265+
const { invalidPaths, validPaths } = validateFiles(readonlyArray)
12661266

12671267
expect(validPaths).toHaveLength(1)
12681268
expect(validPaths).toContain(file1)
@@ -1280,7 +1280,7 @@ describe('fs', () => {
12801280
await fs.writeFile(valid1, '{}', 'utf8')
12811281
await fs.writeFile(valid2, '{}', 'utf8')
12821282

1283-
const { validPaths, invalidPaths } = validateFiles([
1283+
const { invalidPaths, validPaths } = validateFiles([
12841284
valid1,
12851285
invalid1,
12861286
valid2,

0 commit comments

Comments
 (0)