Skip to content

Commit

Permalink
fix: fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattjoh committed Aug 24, 2022
1 parent 0542d11 commit dc40bbb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions test/lib/next-test-utils.js
Expand Up @@ -119,7 +119,7 @@ export function renderViaAPI(app, pathname, query) {
/**
* @param {string} appPort
* @param {string} pathname
* @param {Record<string, any> | undefined} [query]
* @param {Record<string, any> | string | undefined} [query]
* @param {import('node-fetch').RequestInit} [opts]
* @returns {Promise<string>}
*/
Expand All @@ -128,9 +128,9 @@ export function renderViaHTTP(appPort, pathname, query, opts) {
}

/**
* @param {string} appPort
* @param {string | number} appPort
* @param {string} pathname
* @param {Record<string, any> | undefined} [query]
* @param {Record<string, any> | string | undefined} [query]
* @param {import('node-fetch').RequestInit} [opts]
* @returns {Promise<Response & {buffer: any} & {headers: any}>}
*/
Expand Down
8 changes: 4 additions & 4 deletions test/production/required-server-files-i18n.test.ts
Expand Up @@ -171,7 +171,7 @@ describe('should set-up next', () => {
await next.patchFile('standalone/data.txt', 'show')

const res = await fetchViaHTTP(appPort, '/gsp', undefined, {
redirect: 'manual ',
redirect: 'manual',
})
expect(res.status).toBe(200)
expect(res.headers.get('cache-control')).toBe(
Expand All @@ -182,7 +182,7 @@ describe('should set-up next', () => {
await next.patchFile('standalone/data.txt', 'hide')

const res2 = await fetchViaHTTP(appPort, '/gsp', undefined, {
redirect: 'manual ',
redirect: 'manual',
})
expect(res2.status).toBe(404)
expect(res2.headers.get('cache-control')).toBe(
Expand All @@ -194,7 +194,7 @@ describe('should set-up next', () => {
await next.patchFile('standalone/data.txt', 'show')

const res = await fetchViaHTTP(appPort, '/gssp', undefined, {
redirect: 'manual ',
redirect: 'manual',
})
expect(res.status).toBe(200)
expect(res.headers.get('cache-control')).toBe(
Expand All @@ -204,7 +204,7 @@ describe('should set-up next', () => {
await next.patchFile('standalone/data.txt', 'hide')

const res2 = await fetchViaHTTP(appPort, '/gssp', undefined, {
redirect: 'manual ',
redirect: 'manual',
})
await next.patchFile('standalone/data.txt', 'show')

Expand Down
8 changes: 4 additions & 4 deletions test/production/required-server-files.test.ts
Expand Up @@ -416,7 +416,7 @@ describe('should set-up next', () => {
await next.patchFile('standalone/data.txt', 'show')

const res = await fetchViaHTTP(appPort, '/gsp', undefined, {
redirect: 'manual ',
redirect: 'manual',
})
expect(res.status).toBe(200)
expect(res.headers.get('cache-control')).toBe(
Expand All @@ -427,7 +427,7 @@ describe('should set-up next', () => {
await next.patchFile('standalone/data.txt', 'hide')

const res2 = await fetchViaHTTP(appPort, '/gsp', undefined, {
redirect: 'manual ',
redirect: 'manual',
})
expect(res2.status).toBe(404)
expect(res2.headers.get('cache-control')).toBe(
Expand All @@ -439,7 +439,7 @@ describe('should set-up next', () => {
await next.patchFile('standalone/data.txt', 'show')

const res = await fetchViaHTTP(appPort, '/gssp', undefined, {
redirect: 'manual ',
redirect: 'manual',
})
expect(res.status).toBe(200)
expect(res.headers.get('cache-control')).toBe(
Expand All @@ -449,7 +449,7 @@ describe('should set-up next', () => {
await next.patchFile('standalone/data.txt', 'hide')

const res2 = await fetchViaHTTP(appPort, '/gssp', undefined, {
redirect: 'manual ',
redirect: 'manual',
})
await next.patchFile('standalone/data.txt', 'show')

Expand Down

0 comments on commit dc40bbb

Please sign in to comment.