Skip to content

Commit c2efa3c

Browse files
committed
chore: linting
1 parent d118a40 commit c2efa3c

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

test/helpers/edge.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { NEXT_PLUGIN_NAME } from '../../packages/runtime/src/constants'
44
import { generateRscDataEdgeManifest } from '../../packages/runtime/src/helpers/edge'
55

66
jest.mock('../../packages/runtime/src/helpers/functionsMetaData', () => ({
7-
...jest.requireActual('../../packages/runtime/src/helpers/functionsMetaData'),
8-
getPluginVersion: async () => `${NEXT_PLUGIN_NAME}@1.0.0`,
9-
}))
7+
...jest.requireActual('../../packages/runtime/src/helpers/functionsMetaData'),
8+
getPluginVersion: async () => `${NEXT_PLUGIN_NAME}@1.0.0`,
9+
}))
1010

1111
const basePrerenderManifest: PrerenderManifest = {
1212
version: 4,

test/helpers/files.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path, { dirname } from 'path'
22

33
import { readFileSync, copy, ensureDir } from 'fs-extra'
4-
import { resolve , join } from 'pathe'
4+
import { resolve, join } from 'pathe'
55

66
import {
77
matchMiddleware,

test/helpers/verification.spec.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { NetlifyPluginOptions , NetlifyPluginUtils } from '@netlify/build'
1+
import type { NetlifyPluginOptions, NetlifyPluginUtils } from '@netlify/build'
22
import Chance from 'chance'
33
import { outdent } from 'outdent'
44

@@ -9,7 +9,6 @@ import {
99
} from '../../packages/runtime/src/helpers/verification'
1010
import { describeCwdTmpDir, moveNextDist } from '../test-utils'
1111

12-
1312
const netlifyConfig = {
1413
build: { command: 'npm run build' },
1514
functions: {},
@@ -24,9 +23,9 @@ const chance = new Chance()
2423
const { existsSync } = require('fs')
2524

2625
jest.mock('fs', () => ({
27-
...jest.requireActual('fs'),
28-
existsSync: jest.fn(),
29-
}))
26+
...jest.requireActual('fs'),
27+
existsSync: jest.fn(),
28+
}))
3029

3130
describe('checkNextSiteHasBuilt', () => {
3231
let failBuildMock

test/index.spec.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
21
import os from 'os'
32
import path, { resolve } from 'path'
43
import process from 'process'
54

65
import type { NetlifyPluginOptions } from '@netlify/build'
76
import Chance from 'chance'
87
import { writeJSON, unlink, existsSync, readFileSync, ensureDir, readJson, pathExists, writeFile, move } from 'fs-extra'
9-
import { join , relative } from 'pathe'
8+
import { join, relative } from 'pathe'
109
import { dir as getTmpDir } from 'tmp-promise'
1110

1211
// @ts-expect-error - TODO: Convert runtime export to ES6
@@ -20,9 +19,9 @@ import { getAllPageDependencies } from '../packages/runtime/src/templates/getPag
2019
import { changeCwd, useFixture, moveNextDist } from './test-utils'
2120

2221
jest.mock('../packages/runtime/src/helpers/utils', () => ({
23-
...jest.requireActual('../packages/runtime/src/helpers/utils'),
24-
isNextAuthInstalled: jest.fn(),
25-
}))
22+
...jest.requireActual('../packages/runtime/src/helpers/utils'),
23+
isNextAuthInstalled: jest.fn(),
24+
}))
2625

2726
jest.mock('../packages/runtime/src/helpers/functionsMetaData', () => {
2827
const { NEXT_PLUGIN_NAME } = require('../packages/runtime/src/constants')
@@ -322,7 +321,9 @@ describe('onBuild()', () => {
322321
const failBuild = jest.fn().mockImplementation((err) => {
323322
throw new Error(err)
324323
})
325-
await expect(() => nextRuntime.onBuild({ ...defaultArgs, utils: { ...utils, build: { failBuild } } })).rejects.toThrow(
324+
await expect(() =>
325+
nextRuntime.onBuild({ ...defaultArgs, utils: { ...utils, build: { failBuild } } }),
326+
).rejects.toThrow(
326327
`In most cases it should be set to ".next", unless you have chosen a custom "distDir" in your Next config.`,
327328
)
328329
expect(failBuild).toHaveBeenCalled()
@@ -336,9 +337,9 @@ describe('onBuild()', () => {
336337
})
337338
netlifyConfig.build.publish = path.resolve('out')
338339

339-
await expect(() => nextRuntime.onBuild({ ...defaultArgs, utils: { ...utils, build: { failBuild } } })).rejects.toThrow(
340-
`Your publish directory is set to "out", but in most cases it should be ".next".`,
341-
)
340+
await expect(() =>
341+
nextRuntime.onBuild({ ...defaultArgs, utils: { ...utils, build: { failBuild } } }),
342+
).rejects.toThrow(`Your publish directory is set to "out", but in most cases it should be ".next".`)
342343
expect(failBuild).toHaveBeenCalled()
343344
})
344345

test/test-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const rewriteAppDir = async function (dir = '.next') {
2626

2727
// Move .next from sample project to current directory
2828
export const moveNextDist = async function (dir = '.next', copyMods = false) {
29-
await (copyMods ? copyModules(['next', 'sharp']) : stubModules(['next', 'sharp']));
29+
await (copyMods ? copyModules(['next', 'sharp']) : stubModules(['next', 'sharp']))
3030
await ensureDir(dirname(dir))
3131
await copy(path.join(SAMPLE_PROJECT_DIR, '.next'), path.join(process.cwd(), dir))
3232

0 commit comments

Comments
 (0)