@@ -10,13 +10,20 @@ createNextDescribe(
10
10
files : __dirname ,
11
11
skipDeployment : true ,
12
12
} ,
13
- ( { next, isNextStart } ) => {
13
+ ( { next, isNextDev } ) => {
14
14
// If it's start mode, we get the whole logs since they're from build process.
15
15
// If it's dev mode, we get the logs after request
16
16
function getCliOutput ( logStartPosition : number ) {
17
- return isNextStart
18
- ? next . cliOutput
19
- : next . cliOutput . slice ( logStartPosition )
17
+ return isNextDev ? next . cliOutput . slice ( logStartPosition ) : next . cliOutput
18
+ }
19
+
20
+ if ( isNextDev ) {
21
+ it ( 'should not warn metadataBase is missing if there is only absolute url' , async ( ) => {
22
+ const logStartPosition = next . cliOutput . length
23
+ await fetchViaHTTP ( next . url , '/absolute-url-og' )
24
+ const output = getCliOutput ( logStartPosition )
25
+ expect ( output ) . not . toInclude ( METADATA_BASE_WARN_STRING )
26
+ } )
20
27
}
21
28
22
29
it ( 'should fallback to localhost if metadataBase is missing for absolute urls resolving' , async ( ) => {
@@ -30,13 +37,6 @@ createNextDescribe(
30
37
)
31
38
} )
32
39
33
- it ( 'should not warn metadataBase is missing if there is only absolute url' , async ( ) => {
34
- const logStartPosition = next . cliOutput . length
35
- await fetchViaHTTP ( next . url , '/absolute-url-og' )
36
- const output = getCliOutput ( logStartPosition )
37
- expect ( output ) . not . toInclude ( METADATA_BASE_WARN_STRING )
38
- } )
39
-
40
40
it ( 'should warn for unsupported metadata properties' , async ( ) => {
41
41
const logStartPosition = next . cliOutput . length
42
42
await fetchViaHTTP ( next . url , '/unsupported-metadata' )
0 commit comments