Skip to content

Commit 2a4ceae

Browse files
committed
fix: now that we don't use nft anymore, we don't have to copy over node_modules
1 parent 52b79f8 commit 2a4ceae

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

test/index.spec.ts

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,7 @@ import process from 'process'
44

55
import type { NetlifyPluginOptions } from '@netlify/build'
66
import Chance from 'chance'
7-
import {
8-
writeJSON,
9-
unlink,
10-
existsSync,
11-
readFileSync,
12-
ensureDir,
13-
readJson,
14-
pathExists,
15-
writeFile,
16-
move,
17-
copy,
18-
} from 'fs-extra'
7+
import { writeJSON, unlink, existsSync, readFileSync, ensureDir, readJson, pathExists, writeFile, move } from 'fs-extra'
198
import { join, relative } from 'pathe'
209
import { dir as getTmpDir } from 'tmp-promise'
2110

@@ -86,9 +75,7 @@ let cleanup
8675
// In each test, we change cwd to a temporary directory.
8776
// This allows us not to have to mock filesystem operations.
8877
beforeEach(async () => {
89-
const baseTmpDir = path.join(__dirname, '..', 'tmp')
90-
await ensureDir(baseTmpDir)
91-
const tmpDir = await getTmpDir({ unsafeCleanup: true, tmpdir: baseTmpDir })
78+
const tmpDir = await getTmpDir({ unsafeCleanup: true })
9279
restoreCwd = changeCwd(tmpDir.path)
9380
cleanup = tmpDir.cleanup
9481

@@ -537,9 +524,6 @@ describe('onBuild()', () => {
537524
const dir = 'web/.next'
538525
await moveNextDist(dir)
539526

540-
// node_modules need to be in same relative position to .next, so it also needs to go one level deep
541-
await copy(path.join(__dirname, '..', 'node_modules'), path.join(__dirname, '..', 'tmp', 'node_modules'))
542-
543527
netlifyConfig.build.publish = path.resolve(dir)
544528
const config = {
545529
...defaultArgs,

0 commit comments

Comments
 (0)