Skip to content

Commit e9e182d

Browse files
committed
Fix expectations for deploy tests
1 parent f746b4e commit e9e182d

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

Diff for: test/e2e/app-dir/use-cache-metadata-route-handler/use-cache-metadata-route-handler.test.ts

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { nextTestSetup } from 'e2e-utils'
22

33
describe('use-cache-metadata-route-handler', () => {
4-
const { next, isNextStart } = nextTestSetup({
4+
const { next, isNextDev, isNextStart } = nextTestSetup({
55
files: __dirname,
66
})
77

@@ -41,12 +41,12 @@ describe('use-cache-metadata-route-handler', () => {
4141

4242
const body = await res.text()
4343

44-
if (isNextStart) {
44+
if (isNextDev) {
4545
expect(body).toMatchInlineSnapshot(`
4646
"<?xml version="1.0" encoding="UTF-8"?>
4747
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
4848
<url>
49-
<loc>https://acme.com?sentinel=buildtime</loc>
49+
<loc>https://acme.com?sentinel=runtime</loc>
5050
</url>
5151
</urlset>
5252
"
@@ -56,7 +56,7 @@ describe('use-cache-metadata-route-handler', () => {
5656
"<?xml version="1.0" encoding="UTF-8"?>
5757
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
5858
<url>
59-
<loc>https://acme.com?sentinel=runtime</loc>
59+
<loc>https://acme.com?sentinel=buildtime</loc>
6060
</url>
6161
</urlset>
6262
"
@@ -71,12 +71,12 @@ describe('use-cache-metadata-route-handler', () => {
7171

7272
const body = await res.text()
7373

74-
if (isNextStart) {
74+
if (isNextDev) {
7575
expect(body).toMatchInlineSnapshot(`
7676
"<?xml version="1.0" encoding="UTF-8"?>
7777
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
7878
<url>
79-
<loc>https://acme.com/1?sentinel=buildtime</loc>
79+
<loc>https://acme.com/1?sentinel=runtime</loc>
8080
</url>
8181
</urlset>
8282
"
@@ -86,7 +86,7 @@ describe('use-cache-metadata-route-handler', () => {
8686
"<?xml version="1.0" encoding="UTF-8"?>
8787
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
8888
<url>
89-
<loc>https://acme.com/1?sentinel=runtime</loc>
89+
<loc>https://acme.com/1?sentinel=buildtime</loc>
9090
</url>
9191
</urlset>
9292
"
@@ -101,17 +101,17 @@ describe('use-cache-metadata-route-handler', () => {
101101

102102
const body = await res.text()
103103

104-
if (isNextStart) {
104+
if (isNextDev) {
105105
expect(body).toMatchInlineSnapshot(`
106-
"User-Agent: *
107-
Allow: /buildtime
108-
109-
"
110-
`)
106+
"User-Agent: *
107+
Allow: /runtime
108+
109+
"
110+
`)
111111
} else {
112112
expect(body).toMatchInlineSnapshot(`
113113
"User-Agent: *
114-
Allow: /runtime
114+
Allow: /buildtime
115115
116116
"
117117
`)
@@ -125,10 +125,10 @@ describe('use-cache-metadata-route-handler', () => {
125125

126126
const body = await res.json()
127127

128-
if (isNextStart) {
129-
expect(body).toEqual({ name: 'buildtime' })
130-
} else {
128+
if (isNextDev) {
131129
expect(body).toEqual({ name: 'runtime' })
130+
} else {
131+
expect(body).toEqual({ name: 'buildtime' })
132132
}
133133
})
134134
})

0 commit comments

Comments
 (0)