File tree 2 files changed +1
-3
lines changed
2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ module.exports = {
30
30
// Populates the correct config if needed
31
31
await verifyBuildTarget ( { netlifyConfig, packageJson, failBuild } )
32
32
33
- // Because we memoize nextConfig, we need to do this after the write file
34
33
const nextConfig = await getNextConfig ( utils . failBuild )
35
34
36
35
if ( nextConfig . images . domains . length !== 0 && ! process . env . NEXT_IMAGE_ALLOWED_DOMAINS ) {
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ const useFixture = async function (fixtureName) {
49
49
// In each test, we change cwd to a temporary directory.
50
50
// This allows us not to have to mock filesystem operations.
51
51
beforeEach ( async ( ) => {
52
+ // This is so we can test the target setting code
52
53
delete process . env . NEXT_PRIVATE_TARGET
53
54
delete require . cache [ require . resolve ( 'next/dist/telemetry/ci-info' ) ]
54
55
delete require . cache [ require . resolve ( 'next/dist/next-server/server/config' ) ]
@@ -85,15 +86,13 @@ describe('preBuild()', () => {
85
86
} )
86
87
87
88
test ( 'run plugin if the app has next export in an unused script' , async ( ) => {
88
- process . env . hi = 'ok'
89
89
await plugin . onPreBuild ( {
90
90
netlifyConfig,
91
91
packageJson : { ...DUMMY_PACKAGE_JSON , scripts : { export : 'next export' } } ,
92
92
utils,
93
93
constants : { } ,
94
94
} )
95
95
expect ( process . env . NEXT_PRIVATE_TARGET ) . toBe ( 'serverless' )
96
- // expect(await pathExists('next.config.js')).toBeTruthy()
97
96
} )
98
97
99
98
test ( 'do nothing if app has static html export in toml/ntl config' , async ( ) => {
You can’t perform that action at this time.
0 commit comments