@@ -61,14 +61,14 @@ describe('SSR Pages', () => {
61
61
const functionsDir = join ( PROJECT_PATH , 'out_functions' )
62
62
63
63
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 (
68
68
true ,
69
69
)
70
70
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' ) ,
72
72
) . toMatch ( `require("./nextPage/pages/getServerSideProps/[id].js")` )
73
73
} )
74
74
} )
@@ -77,10 +77,10 @@ describe('API Pages', () => {
77
77
const functionsDir = join ( PROJECT_PATH , 'out_functions' )
78
78
79
79
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 )
84
84
} )
85
85
} )
86
86
@@ -126,10 +126,10 @@ describe('SSG Pages with getStaticProps', () => {
126
126
} )
127
127
128
128
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 '
130
130
expect ( existsSync ( join ( PROJECT_PATH , 'out_functions' , functionPath1 ) ) ) . toBe ( true )
131
131
132
- const functionPath2 = 'next_getStaticProps_withFallback_slug/next_getStaticProps_withFallback_slug.ts '
132
+ const functionPath2 = 'next_getStaticProps_withFallback_slug/next_getStaticProps_withFallback_slug.js '
133
133
expect ( existsSync ( join ( PROJECT_PATH , 'out_functions' , functionPath2 ) ) ) . toBe ( true )
134
134
} )
135
135
} )
@@ -139,19 +139,19 @@ describe('SSG Pages with getStaticProps and revalidate', () => {
139
139
140
140
test ( 'creates a Netlify Function for each page' , ( ) => {
141
141
expect (
142
- existsSync ( join ( functionsDir , 'next_getStaticProps_withrevalidate' , 'next_getStaticProps_withrevalidate.ts ' ) ) ,
142
+ existsSync ( join ( functionsDir , 'next_getStaticProps_withrevalidate' , 'next_getStaticProps_withrevalidate.js ' ) ) ,
143
143
) . toBe ( true )
144
144
expect (
145
145
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 ' ) ,
147
147
) ,
148
148
) . toBe ( true )
149
149
expect (
150
150
existsSync (
151
151
join (
152
152
functionsDir ,
153
153
'next_getStaticProps_withRevalidate_withFallback_id' ,
154
- 'next_getStaticProps_withRevalidate_withFallback_id.ts ' ,
154
+ 'next_getStaticProps_withRevalidate_withFallback_id.js ' ,
155
155
) ,
156
156
) ,
157
157
) . toBe ( true )
0 commit comments