Skip to content

Commit 1e98f4f

Browse files
committed
fix up e2e tests
1 parent 141d46e commit 1e98f4f

File tree

4 files changed

+254
-141
lines changed

4 files changed

+254
-141
lines changed

package-lock.json

Lines changed: 103 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 114 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,88 @@
11
tests:
2-
# - name: with-js-config-object-style
3-
# config: |
4-
# /** @type {import('next').NextConfig} */
5-
# const nextConfig = {
6-
# reactStrictMode: true,
7-
# async headers() {
8-
# return [
9-
# {
10-
# source: '/:path*',
11-
# headers: [
12-
# {
13-
# key: 'x-custom-header',
14-
# value: 'js-config-value',
15-
# },
16-
# {
17-
# key: 'x-config-type',
18-
# value: 'object',
19-
# },
20-
# ],
21-
# },
22-
# ];
23-
# },
24-
# };
2+
- name: with-js-config-object-style
3+
config: |
4+
/** @type {import('next').NextConfig} */
5+
const nextConfig = {
6+
reactStrictMode: true,
7+
async headers() {
8+
return [
9+
{
10+
source: '/:path*',
11+
headers: [
12+
{
13+
key: 'x-custom-header',
14+
value: 'js-config-value',
15+
},
16+
{
17+
key: 'x-config-type',
18+
value: 'object',
19+
},
20+
],
21+
},
22+
];
23+
},
24+
};
2525
26-
# module.exports = nextConfig;
27-
# file: next.config.js
28-
# - name: with-js-config-function-style
29-
# config: |
30-
# /** @type {import('next').NextConfig} */
31-
# const nextConfig = (phase, { defaultConfig }) => {
32-
# return {
33-
# reactStrictMode: true,
34-
# async headers() {
35-
# return [
36-
# {
37-
# source: '/:path*',
38-
# headers: [
39-
# {
40-
# key: 'x-custom-header',
41-
# value: 'js-config-value',
42-
# },
43-
# {
44-
# key: 'x-config-type',
45-
# value: 'function',
46-
# },
47-
# ],
48-
# },
49-
# ];
50-
# }
51-
# };
52-
# };
26+
module.exports = nextConfig;
27+
file: next.config.js
28+
- name: with-js-config-function-style
29+
config: |
30+
/** @type {import('next').NextConfig} */
31+
const nextConfig = (phase, { defaultConfig }) => {
32+
return {
33+
reactStrictMode: true,
34+
async headers() {
35+
return [
36+
{
37+
source: '/:path*',
38+
headers: [
39+
{
40+
key: 'x-custom-header',
41+
value: 'js-config-value',
42+
},
43+
{
44+
key: 'x-config-type',
45+
value: 'function',
46+
},
47+
],
48+
},
49+
];
50+
}
51+
};
52+
};
5353
54-
# module.exports = nextConfig;
55-
# file: next.config.js
56-
# - name: with-js-async-function
57-
# config: |
58-
# // @ts-check
54+
module.exports = nextConfig;
55+
file: next.config.js
56+
- name: with-js-async-function
57+
config: |
58+
// @ts-check
5959
60-
# module.exports = async (phase, { defaultConfig }) => {
61-
# /**
62-
# * @type {import('next').NextConfig}
63-
# */
64-
# const nextConfig = {
65-
# async headers() {
66-
# return [
67-
# {
68-
# source: '/:path*',
69-
# headers: [
70-
# {
71-
# key: 'x-custom-header',
72-
# value: 'js-config-value',
73-
# },
74-
# {
75-
# key: 'x-config-type',
76-
# value: 'function',
77-
# },
78-
# ],
79-
# },
80-
# ];
81-
# }
82-
# }
83-
# return nextConfig
84-
# }
85-
# file: next.config.js
60+
module.exports = async (phase, { defaultConfig }) => {
61+
/**
62+
* @type {import('next').NextConfig}
63+
*/
64+
const nextConfig = {
65+
async headers() {
66+
return [
67+
{
68+
source: '/:path*',
69+
headers: [
70+
{
71+
key: 'x-custom-header',
72+
value: 'js-config-value',
73+
},
74+
{
75+
key: 'x-config-type',
76+
value: 'function',
77+
},
78+
],
79+
},
80+
];
81+
}
82+
}
83+
return nextConfig
84+
}
85+
file: next.config.js
8686
- name: with-ts-config
8787
config: |
8888
import type { NextConfig } from 'next'
@@ -105,40 +105,40 @@ tests:
105105
106106
export default nextConfig
107107
file: next.config.ts
108-
# - name: with-ecmascript-modules
109-
# config: |
110-
# // @ts-check
108+
- name: with-ecmascript-modules
109+
config: |
110+
// @ts-check
111111
112-
# /**
113-
# * @type {import('next').NextConfig}
114-
# */
115-
# const nextConfig = {
116-
# /* config options here */
117-
# async headers() {
118-
# return [
119-
# {
120-
# source: '/:path*',
121-
# headers: [
122-
# {
123-
# key: 'x-custom-header',
124-
# value: 'mjs-config-value',
125-
# },
126-
# ],
127-
# },
128-
# ];
129-
# }
130-
# }
112+
/**
113+
* @type {import('next').NextConfig}
114+
*/
115+
const nextConfig = {
116+
/* config options here */
117+
async headers() {
118+
return [
119+
{
120+
source: '/:path*',
121+
headers: [
122+
{
123+
key: 'x-custom-header',
124+
value: 'mjs-config-value',
125+
},
126+
],
127+
},
128+
];
129+
}
130+
}
131131
132-
# export default nextConfig
133-
# file: next.config.mjs
134-
# - name: with-empty-config
135-
# config: |
136-
# // @ts-check
132+
export default nextConfig
133+
file: next.config.mjs
134+
- name: with-empty-config
135+
config: |
136+
// @ts-check
137137
138-
# /** @type {import('next').NextConfig} */
139-
# const nextConfig = {
140-
# /* config options here */
141-
# }
138+
/** @type {import('next').NextConfig} */
139+
const nextConfig = {
140+
/* config options here */
141+
}
142142
143-
# module.exports = nextConfig
144-
# file: next.config.js
143+
module.exports = nextConfig
144+
file: next.config.js

0 commit comments

Comments
 (0)