@@ -61,14 +61,14 @@ describe('SSR Pages', () => {
6161 const functionsDir = join ( PROJECT_PATH , 'out_functions' )
6262
6363 test ( 'creates a Netlify Function for each SSR page' , ( ) => {
64- expect ( existsSync ( join ( functionsDir , 'next_index' , 'next_index.ts ' ) ) ) . toBe ( true )
65- expect ( existsSync ( join ( functionsDir , 'next_shows_id' , 'next_shows_id.ts ' ) ) ) . toBe ( true )
66- expect ( existsSync ( join ( functionsDir , 'next_shows_params' , 'next_shows_params.ts ' ) ) ) . toBe ( true )
67- expect ( existsSync ( join ( functionsDir , 'next_getServerSideProps_static' , 'next_getServerSideProps_static.ts ' ) ) ) . toBe (
64+ expect ( existsSync ( join ( functionsDir , 'next_index' , 'next_index.js ' ) ) ) . toBe ( true )
65+ expect ( existsSync ( join ( functionsDir , 'next_shows_id' , 'next_shows_id.js ' ) ) ) . toBe ( true )
66+ expect ( existsSync ( join ( functionsDir , 'next_shows_params' , 'next_shows_params.js ' ) ) ) . toBe ( true )
67+ expect ( existsSync ( join ( functionsDir , 'next_getServerSideProps_static' , 'next_getServerSideProps_static.js ' ) ) ) . toBe (
6868 true ,
6969 )
7070 expect (
71- readFileSync ( join ( functionsDir , 'next_getServerSideProps_id' , 'next_getServerSideProps_id.ts ' ) , 'utf-8' ) ,
71+ readFileSync ( join ( functionsDir , 'next_getServerSideProps_id' , 'next_getServerSideProps_id.js ' ) , 'utf-8' ) ,
7272 ) . toMatch ( `require("./nextPage/pages/getServerSideProps/[id].js")` )
7373 } )
7474} )
@@ -77,10 +77,10 @@ describe('API Pages', () => {
7777 const functionsDir = join ( PROJECT_PATH , 'out_functions' )
7878
7979 test ( 'creates a Netlify Function for each API endpoint' , ( ) => {
80- expect ( existsSync ( join ( functionsDir , 'next_api_static' , 'next_api_static.ts ' ) ) ) . toBe ( true )
81- expect ( existsSync ( join ( functionsDir , 'next_api_shows_id' , 'next_api_shows_id.ts ' ) ) ) . toBe ( true )
82- expect ( existsSync ( join ( functionsDir , 'next_api_shows_params' , 'next_api_shows_params.ts ' ) ) ) . toBe ( true )
83- expect ( existsSync ( join ( functionsDir , 'next_api_hello-background' , 'next_api_hello-background.ts ' ) ) ) . toBe ( true )
80+ expect ( existsSync ( join ( functionsDir , 'next_api_static' , 'next_api_static.js ' ) ) ) . toBe ( true )
81+ expect ( existsSync ( join ( functionsDir , 'next_api_shows_id' , 'next_api_shows_id.js ' ) ) ) . toBe ( true )
82+ expect ( existsSync ( join ( functionsDir , 'next_api_shows_params' , 'next_api_shows_params.js ' ) ) ) . toBe ( true )
83+ expect ( existsSync ( join ( functionsDir , 'next_api_hello-background' , 'next_api_hello-background.js ' ) ) ) . toBe ( true )
8484 } )
8585} )
8686
@@ -126,10 +126,10 @@ describe('SSG Pages with getStaticProps', () => {
126126 } )
127127
128128 test ( 'creates Netlify Functions for pages with fallback' , ( ) => {
129- const functionPath1 = 'next_getStaticProps_withFallback_id/next_getStaticProps_withFallback_id.ts '
129+ const functionPath1 = 'next_getStaticProps_withFallback_id/next_getStaticProps_withFallback_id.js '
130130 expect ( existsSync ( join ( PROJECT_PATH , 'out_functions' , functionPath1 ) ) ) . toBe ( true )
131131
132- const functionPath2 = 'next_getStaticProps_withFallback_slug/next_getStaticProps_withFallback_slug.ts '
132+ const functionPath2 = 'next_getStaticProps_withFallback_slug/next_getStaticProps_withFallback_slug.js '
133133 expect ( existsSync ( join ( PROJECT_PATH , 'out_functions' , functionPath2 ) ) ) . toBe ( true )
134134 } )
135135} )
@@ -139,19 +139,19 @@ describe('SSG Pages with getStaticProps and revalidate', () => {
139139
140140 test ( 'creates a Netlify Function for each page' , ( ) => {
141141 expect (
142- existsSync ( join ( functionsDir , 'next_getStaticProps_withrevalidate' , 'next_getStaticProps_withrevalidate.ts ' ) ) ,
142+ existsSync ( join ( functionsDir , 'next_getStaticProps_withrevalidate' , 'next_getStaticProps_withrevalidate.js ' ) ) ,
143143 ) . toBe ( true )
144144 expect (
145145 existsSync (
146- join ( functionsDir , 'next_getStaticProps_withRevalidate_id' , 'next_getStaticProps_withRevalidate_id.ts ' ) ,
146+ join ( functionsDir , 'next_getStaticProps_withRevalidate_id' , 'next_getStaticProps_withRevalidate_id.js ' ) ,
147147 ) ,
148148 ) . toBe ( true )
149149 expect (
150150 existsSync (
151151 join (
152152 functionsDir ,
153153 'next_getStaticProps_withRevalidate_withFallback_id' ,
154- 'next_getStaticProps_withRevalidate_withFallback_id.ts ' ,
154+ 'next_getStaticProps_withRevalidate_withFallback_id.js ' ,
155155 ) ,
156156 ) ,
157157 ) . toBe ( true )
0 commit comments