File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- var getConfig = require ( "next/config" ) ;
1+ var getConfig = require ( "next/config" ) . default ;
22
33var { serverRuntimeConfig, publicRuntimeConfig } = getConfig ( ) ;
44
Original file line number Diff line number Diff line change 11jest . mock (
22 "next/config" ,
3- ( ) =>
4- function getConfig ( ) {
3+ ( ) => ( {
4+ default : function getConfig ( ) {
55 return {
66 serverRuntimeConfig : { secret : 12345 } ,
77 publicRuntimeConfig : { api : "/graphql" }
88 } ;
9- } ,
9+ }
10+ } ) ,
1011 { virtual : true }
1112) ;
1213
Original file line number Diff line number Diff line change 1818 "next" : " >=5.1.0"
1919 },
2020 "devDependencies" : {
21+ "config" : " ^2.0.1" ,
2122 "jest" : " ^23.5.0" ,
2223 "prettier" : " ^1.14.2"
2324 }
Original file line number Diff line number Diff line change @@ -627,6 +627,12 @@ concat-map@0.0.1:
627627 version "0.0.1"
628628 resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
629629
630+ config@^2.0.1 :
631+ version "2.0.1"
632+ resolved "https://registry.yarnpkg.com/config/-/config-2.0.1.tgz#995ccc8175460578d646ac0a2e4018ffa44ca046"
633+ dependencies :
634+ json5 "^1.0.1"
635+
630636console-control-strings@^1.0.0, console-control-strings@~1.1.0 :
631637 version "1.1.0"
632638 resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
@@ -1898,6 +1904,12 @@ json5@^0.5.1:
18981904 version "0.5.1"
18991905 resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
19001906
1907+ json5@^1.0.1 :
1908+ version "1.0.1"
1909+ resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
1910+ dependencies :
1911+ minimist "^1.2.0"
1912+
19011913jsprim@^1.2.2 :
19021914 version "1.4.1"
19031915 resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
You can’t perform that action at this time.
0 commit comments