Unverified Commit 32057c84 authored by Jan Potoms's avatar Jan Potoms Committed by GitHub

Use the jest-circus test runner (#12974)

parent c239c746
module.exports = {
// this will become default in jest 27:
testRunner: 'jest-circus/runner',
testMatch: ['**/*.test.js'],
verbose: true,
rootDir: 'test',
modulePaths: ['<rootDir>/lib'],
globalSetup: '<rootDir>/jest-global-setup.js',
globalTeardown: '<rootDir>/jest-global-teardown.js',
setupFilesAfterEnv: ['<rootDir>/jest-setup-after-env.js'],
testEnvironment: '<rootDir>/jest-environment.js',
}
......@@ -76,6 +76,7 @@
"fs-extra": "9.0.0",
"get-port": "5.1.1",
"isomorphic-unfetch": "3.0.0",
"jest-circus": "26.0.1",
"jest-cli": "24.9.0",
"ky": "0.19.1",
"ky-universal": "0.6.0",
......
/* global jasmine */
/* eslint-env jest */
import { sandbox } from './helpers'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
test('can edit a component without losing state', async () => {
const [session, cleanup] = await sandbox()
......
/* global jasmine */
/* eslint-env jest */
import { sandbox } from './helpers'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
test('logbox: can recover from a syntax error without losing state', async () => {
const [session, cleanup] = await sandbox()
......
/* global jasmine */
/* eslint-env jest */
import { sandbox } from './helpers'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
// https://github.com/zeit/next.js/issues/12422
test('styled-components hydration mismatch', async () => {
......
/* global jasmine */
/* eslint-env jest */
import { sandbox } from './helpers'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
// https://github.com/facebook/metro/blob/b651e535cd0fc5df6c0803b9aa647d664cb9a6c3/packages/metro/src/lib/polyfills/__tests__/require-test.js#L989-L1048
test('re-runs accepted modules', async () => {
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import {
......@@ -12,7 +12,7 @@ import {
fetchViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../')
const nextConfig = join(appDir, 'next.config.js')
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import {
......@@ -12,7 +12,7 @@ import {
fetchViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../')
const nextConfig = join(appDir, 'next.config.js')
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import {
......@@ -13,7 +13,7 @@ import {
waitFor,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../')
const pages404 = join(appDir, 'pages/404.js')
......
/* eslint-env jest */
/* global jasmine */
import { promises } from 'fs'
import { join } from 'path'
import { validateAMP } from 'amp-test-utils'
import { File, nextBuild, nextExport, runNextCommand } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const { access, readFile } = promises
const appDir = join(__dirname, '../')
const outDir = join(appDir, 'out')
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import {
nextBuild,
......@@ -9,7 +9,7 @@ import {
renderViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
let app
let appPort
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import {
nextBuild,
......@@ -10,7 +10,7 @@ import {
renderViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
let app
let appPort
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import cheerio from 'cheerio'
import { validateAMP } from 'amp-test-utils'
......@@ -11,7 +11,7 @@ import {
renderViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60
jest.setTimeout(1000 * 60)
const appDir = join(__dirname, '../')
let appPort
let server
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import cheerio from 'cheerio'
......@@ -20,7 +20,7 @@ let builtServerPagesDir
let appPort
let app
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const fsExists = file =>
fs
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import cheerio from 'cheerio'
import webdriver from 'next-webdriver'
......@@ -29,7 +29,7 @@ const appDir = join(__dirname, '../')
let appPort
let server
let app
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const context = {}
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import AbortController from 'abort-controller'
......@@ -15,7 +15,7 @@ import {
} from 'next-test-utils'
import json from '../big.json'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../')
const nextConfig = join(appDir, 'next.config.js')
let appPort
......
/* eslint-env jest */
/* global jasmine */
import { readFileSync, writeFileSync } from 'fs'
import webdriver from 'next-webdriver'
import { join } from 'path'
......@@ -13,7 +13,7 @@ import {
let appPort
let server
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
describe('App asPath', () => {
beforeAll(async () => {
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import cheerio from 'cheerio'
import {
......@@ -13,7 +13,7 @@ import {
killApp,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60
jest.setTimeout(1000 * 60)
const appDir = join(__dirname, '../')
let appPort
let server
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import cheerio from 'cheerio'
import {
......@@ -10,7 +10,7 @@ import {
renderViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60
jest.setTimeout(1000 * 60)
const appDir = join(__dirname, '../')
let appPort
let server
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import {
renderViaHTTP,
......@@ -17,7 +17,7 @@ import csp from './csp'
const context = {
output: '',
}
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const collectOutput = message => {
context.output += message
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { renderViaHTTP, findPort, launchApp, killApp } from 'next-test-utils'
const context = {
output: '',
}
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const collectOutput = message => {
context.output += message
......
/* eslint-env jest */
/* global jasmine */
import path from 'path'
import fs from 'fs-extra'
import webdriver from 'next-webdriver'
......@@ -13,7 +13,7 @@ import {
waitFor,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '..')
const nextConfig = path.join(appDir, 'next.config.js')
......
/* eslint-env jest */
/* global jasmine */
import path from 'path'
import fs from 'fs-extra'
import { nextBuild, nextExport } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '..')
const outdir = path.join(__dirname, 'out')
const nextConfig = path.join(appDir, 'next.config.js')
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs'
import path from 'path'
import { nextBuild } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '..')
describe('Auto Export Error Serverless', () => {
......
/* eslint-env jest */
/* global jasmine */
import webdriver from 'next-webdriver'
import path from 'path'
import { nextBuild, nextStart, findPort, killApp } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '..')
let appPort
let app
......
/* eslint-env jest */
/* global jasmine */
import webdriver from 'next-webdriver'
import path from 'path'
import {
......@@ -10,7 +10,7 @@ import {
launchApp,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '..')
let appPort
let app
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { nextBuild } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
describe('Babel', () => {
it('should allow setting targets.browsers', async () => {
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import {
renderViaHTTP,
......@@ -13,7 +13,7 @@ import {
import rendering from './rendering'
const context = {}
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
describe('Babel', () => {
beforeAll(async () => {
......
/* eslint-env jest */
/* global jasmine */
import webdriver from 'next-webdriver'
import { join } from 'path'
import url from 'url'
......@@ -26,7 +26,7 @@ import fs, {
} from 'fs-extra'
import cheerio from 'cheerio'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '..')
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { renderViaHTTP, findPort, launchApp, killApp } from 'next-test-utils'
......@@ -12,7 +12,7 @@ import publicFolder from './public-folder'
import security from './security'
const context = {}
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
describe('Basic Features', () => {
beforeAll(async () => {
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import {
......@@ -11,7 +11,7 @@ import {
findPort,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '..')
const nextConfig = join(appDir, 'next.config.js')
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import webdriver from 'next-webdriver'
import { findPort, launchApp, killApp, waitFor } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const appDir = join(__dirname, '..')
const nextConfig = join(appDir, 'next.config.js')
let appPort
......
/* eslint-env jest */
/* global jasmine */
import 'flat-map-polyfill'
import { remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
import { recursiveReadDir } from 'next/dist/lib/recursive-readdir'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const fixturesDir = join(__dirname, '..', 'fixtures')
......
/* eslint-env jest */
/* global jasmine */
import { remove } from 'fs-extra'
import { File, nextBuild, waitFor } from 'next-test-utils'
import { join } from 'path'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = join(__dirname, '../')
describe('Build warnings', () => {
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import fs from 'fs-extra'
import {
......@@ -10,7 +10,7 @@ import {
killApp,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = join(__dirname, '../')
const nextConfig = join(appDir, 'next.config.js')
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { readFile } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = join(__dirname, '../')
let buildId
......
/* eslint-env jest */
/* global jasmine */
import cheerio from 'cheerio'
import express from 'express'
import { access, readdir, readFile, unlink } from 'fs-extra'
......@@ -8,7 +8,7 @@ import { nextBuild, nextServer, promiseCall, stopApp } from 'next-test-utils'
import webdriver from 'next-webdriver'
import { join } from 'path'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = join(__dirname, '../')
......
/* eslint-env jest */
/* global jasmine */
import { runNextCommand, runNextCommandDev, findPort } from 'next-test-utils'
import { join } from 'path'
import pkg from 'next/package'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const dir = join(__dirname, '..')
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { renderViaHTTP, findPort, launchApp, killApp } from 'next-test-utils'
......@@ -7,7 +7,7 @@ import { renderViaHTTP, findPort, launchApp, killApp } from 'next-test-utils'
import clientNavigation from './client-navigation'
const context = {}
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
describe('Client 404', () => {
beforeAll(async () => {
......
/* eslint-env jest */
/* global jasmine */
import {
fetchViaHTTP,
findPort,
......@@ -16,7 +16,7 @@ import { join } from 'path'
import renderingSuite from './rendering'
const context = {}
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
describe('Client Navigation', () => {
beforeAll(async () => {
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import {
fetchViaHTTP,
......@@ -10,7 +10,7 @@ import {
} from 'next-test-utils'
const context = {}
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
describe('Compression', () => {
beforeAll(async () => {
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import {
nextBuild,
......@@ -9,7 +9,7 @@ import {
waitFor,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '..')
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { nextBuild, File } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 30
jest.setTimeout(1000 * 30)
const appDir = join(__dirname, '..')
const configFile = new File(join(appDir, '/next.config.js'))
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { runNextCommand, findPort, File } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 30
jest.setTimeout(1000 * 30)
const configFile = new File(join(__dirname, '../next.config.js'))
describe('Promise in next config', () => {
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { runNextCommand } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
describe('Invalid resolve alias', () => {
it('should show relevant error when webpack resolve alias is wrong', async () => {
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import {
renderViaHTTP,
......@@ -15,7 +15,7 @@ import rendering from './rendering'
import client from './client'
const context = {}
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
describe('Configuration', () => {
beforeAll(async () => {
......
/* eslint-env jest */
/* global jasmine */
import path from 'path'
import {
nextBuild,
......@@ -9,7 +9,7 @@ import {
renderViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const appDir = path.join(__dirname, '..')
describe('Errors on conflict between public file and page file', () => {
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { killApp, nextBuild } from 'next-test-utils'
import { nextBuild } from 'next-test-utils'
const appDir = join(__dirname, '../')
let server
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
describe('Conformance system', () => {
let build
......@@ -15,7 +14,6 @@ describe('Conformance system', () => {
stderr: true,
})
})
afterAll(() => killApp(server))
it('Should warn about sync external sync scripts', async () => {
const { stderr } = build
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { remove } from 'fs-extra'
import {
......@@ -12,7 +12,7 @@ import {
import cheerio from 'cheerio'
import webdriver from 'next-webdriver'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const fixturesDir = join(__dirname, '../../css-fixtures')
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { readdir, readFile, remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import escapeStringRegexp from 'escape-string-regexp'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const fixturesDir = join(__dirname, '../..', 'css-fixtures')
......
/* eslint-env jest */
/* global jasmine */
import { readdir, readFile, remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const fixturesDir = join(__dirname, '../fixtures')
......
/* eslint-env jest */
/* global jasmine */
import cheerio from 'cheerio'
import { readdir, readFile, remove } from 'fs-extra'
import {
......@@ -15,7 +15,7 @@ import {
import webdriver from 'next-webdriver'
import { join } from 'path'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const fixturesDir = join(__dirname, '../../css-fixtures')
......
/* eslint-env jest */
/* global jasmine */
import 'flat-map-polyfill'
import { join } from 'path'
import { readdir, readFile, remove } from 'fs-extra'
......@@ -16,7 +16,7 @@ import {
import webdriver from 'next-webdriver'
import cheerio from 'cheerio'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const fixturesDir = join(__dirname, '../..', 'css-fixtures')
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import {
......@@ -11,7 +11,7 @@ import {
launchApp,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '..')
const page404 = join(appDir, 'pages/404.js')
const nextConfig = join(appDir, 'next.config.js')
......@@ -39,7 +39,7 @@ describe('Custom _error', () => {
},
})
})
afterAll(() => killApp())
afterAll(() => killApp(app))
it('should not warn with /_error and /404 when rendering error first', async () => {
stderr = ''
......@@ -62,7 +62,7 @@ describe('Custom _error', () => {
},
})
})
afterAll(() => killApp())
afterAll(() => killApp(app))
it('should not warn with /_error and /404', async () => {
stderr = ''
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import {
nextBuild,
......@@ -11,7 +11,7 @@ import {
File,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = join(__dirname, '..')
let appPort
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import {
......@@ -11,7 +11,7 @@ import {
renderViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
let appDir = join(__dirname, '..')
let buildId
......
/* eslint-env jest */
/* global jasmine */
import http from 'http'
import url from 'url'
import stripAnsi from 'strip-ansi'
......@@ -21,7 +21,7 @@ import {
initNextServerScript,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
let appDir = join(__dirname, '..')
const nextConfigPath = join(appDir, 'next.config.js')
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { buildTS } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../')
......
/* eslint-env jest */
/* global jasmine */
import webdriver from 'next-webdriver'
import { join } from 'path'
import getPort from 'get-port'
......@@ -20,7 +20,7 @@ const indexPg = new File(join(appDir, 'pages/index.js'))
let appPort
let server
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const context = {}
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import cheerio from 'cheerio'
import {
......@@ -10,7 +10,7 @@ import {
renderViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../')
let appPort
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import cheerio from 'cheerio'
import {
......@@ -17,7 +17,7 @@ const appDir = join(__dirname, '../')
let appPort
let server
let app
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const context = {}
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import { BUILD_ID_FILE } from 'next/constants'
......@@ -11,7 +11,7 @@ import {
renderViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../')
const nextConfig = join(appDir, 'next.config.js')
let appPort
......
/* eslint-env jest */
/* global jasmine */
import path from 'path'
import {
......@@ -10,7 +10,7 @@ import {
killApp,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '..')
describe('Handles Duplicate Pages', () => {
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { renderViaHTTP, launchApp, findPort, killApp } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 30
jest.setTimeout(1000 * 30)
let server
let appPort
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import {
......@@ -10,7 +10,7 @@ import {
waitFor,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 30 * 2
jest.setTimeout(1000 * 30 * 2)
let app
let appPort
......
/* eslint-env jest */
/* global jasmine */
import webdriver from 'next-webdriver'
import { join } from 'path'
import fs from 'fs-extra'
......@@ -17,7 +17,7 @@ import {
import cheerio from 'cheerio'
import escapeRegex from 'escape-string-regexp'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
let app
let appPort
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import webdriver from 'next-webdriver'
import {
......@@ -10,7 +10,7 @@ import {
waitFor,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '..')
let output = ''
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import fs from 'fs'
import { fetchViaHTTP, findPort, launchApp, killApp } from 'next-test-utils'
const context = {}
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
describe('Empty Project', () => {
beforeAll(async () => {
......
/* eslint-env jest */
/* global jasmine */
import url from 'url'
import fs from 'fs-extra'
import { join } from 'path'
......@@ -14,7 +14,7 @@ import {
fetchViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
let app
let appPort
......
/* eslint-env jest */
/* global jasmine */
import path from 'path'
import webdriver from 'next-webdriver'
import {
......@@ -11,7 +11,7 @@ import {
waitFor,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '..')
let app
let port
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import fs from 'fs-extra'
import webdriver from 'next-webdriver'
import { nextBuild, nextStart, findPort, killApp, check } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = join(__dirname, '..')
let app
......
/* eslint-env jest */
/* global jasmine */
import path from 'path'
import fs from 'fs-extra'
import { nextBuild, nextExport } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '..')
const nextConfig = path.join(appDir, 'next.config.js')
......
/* eslint-env jest */
/* global jasmine */
import { promises } from 'fs'
import { join } from 'path'
import cheerio from 'cheerio'
import { nextBuild, nextExport } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const { access, readFile } = promises
const appDir = join(__dirname, '../')
const outdir = join(appDir, 'out')
......
/* eslint-env jest */
/* global jasmine */
import { promises } from 'fs'
import { join } from 'path'
import cheerio from 'cheerio'
import { nextBuild, nextExport } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const { access, readFile } = promises
const appDir = join(__dirname, '../')
const outdir = join(appDir, 'out')
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import cheerio from 'cheerio'
import webdriver from 'next-webdriver'
......@@ -11,7 +11,7 @@ import {
renderViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60
jest.setTimeout(1000 * 60)
const appDir = join(__dirname, '../')
const outdir = join(appDir, 'out')
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import cheerio from 'cheerio'
import webdriver from 'next-webdriver'
......@@ -11,7 +11,7 @@ import {
renderViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60
jest.setTimeout(1000 * 60)
const appDir = join(__dirname, '../')
const outdir = join(appDir, 'out')
......
/* eslint-env jest */
/* global jasmine */
import { remove } from 'fs-extra'
import { nextBuild, nextExport, nextExportDefault } from 'next-test-utils'
import path, { join } from 'path'
import fs from 'fs'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const fixturesDir = join(__dirname, '..', 'fixtures')
......
/* eslint-env jest */
/* global jasmine */
import { promises } from 'fs'
import { join } from 'path'
import { nextBuild, nextExport } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const { readFile } = promises
const appDir = join(__dirname, '../')
const outdir = join(appDir, 'out')
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { promises } from 'fs'
import {
......@@ -20,7 +20,7 @@ import dev from './dev'
import dynamic from './dynamic'
import apiRoutes from './api-routes'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const { access, mkdir, writeFile } = promises
const appDir = join(__dirname, '../')
......
/* eslint-env jest */
/* global jasmine */
import { promises } from 'fs'
import { join } from 'path'
import cheerio from 'cheerio'
import { nextBuild, nextExport } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const { access, readFile } = promises
const appDir = join(__dirname, '../')
const outdir = join(appDir, 'out')
......
/* eslint-env jest */
/* global jasmine */
import { promises } from 'fs'
import { join } from 'path'
import cheerio from 'cheerio'
import { nextBuild, nextExport } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const { access, readFile } = promises
const appDir = join(__dirname, '../')
const outdir = join(appDir, 'out')
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import {
nextBuild,
......@@ -20,7 +20,7 @@ import { promises } from 'fs'
import dynamic from './dynamic'
import apiRoutes from './api-routes'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const { access, mkdir, writeFile } = promises
const appDir = join(__dirname, '../')
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import {
killApp,
......@@ -12,7 +12,7 @@ import {
const appDir = join(__dirname, '../')
let appPort
let app
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
describe('External Assets', () => {
beforeAll(async () => {
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import path from 'path'
import { nextBuild } from 'next-test-utils'
import escapeStringRegexp from 'escape-string-regexp'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '../app')
let buildId
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import {
......@@ -13,7 +13,7 @@ import {
} from 'next-test-utils'
import clone from 'clone'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../')
const nextConfig = join(appDir, 'next.config.js')
let appPort
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import {
......@@ -15,7 +15,7 @@ import {
import clone from 'clone'
import cheerio from 'cheerio'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../')
const nextConfig = join(appDir, 'next.config.js')
let appPort
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import {
......@@ -11,7 +11,7 @@ import {
launchApp,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../')
let appPort
......
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import getPort from 'get-port'
import { fetchViaHTTP, initNextServerScript, killApp } from 'next-test-utils'
......@@ -8,7 +8,7 @@ import clone from 'clone'
const appDir = join(__dirname, '../')
let appPort
let server
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const context = {}
......
/* eslint-env jest */
/* global jasmine */
import path from 'path'
import fs from 'fs-extra'
import { nextBuild } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '..')
const nextConfig = path.join(appDir, 'next.config.js')
......
/* eslint-env jest */
/* global jasmine */
import webdriver from 'next-webdriver'
import { join } from 'path'
import {
......@@ -10,7 +10,7 @@ import {
renderViaHTTP,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
let appDir = join(__dirname, '../')
let server
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { nextBuild, nextExport } from 'next-test-utils'
import { join } from 'path'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '..')
const nextConfig = join(appDir, 'next.config.js')
......
/* eslint-env jest */
/* global jasmine */
import cheerio from 'cheerio'
import cookie from 'cookie'
import fs from 'fs-extra'
......@@ -18,7 +18,7 @@ import os from 'os'
import { join } from 'path'
import qs from 'querystring'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '..')
const nextConfigPath = join(appDir, 'next.config.js')
......
/* eslint-env jest */
/* global jasmine */
import cheerio from 'cheerio'
import escapeRegex from 'escape-string-regexp'
import fs from 'fs-extra'
......@@ -20,7 +20,7 @@ import {
import webdriver from 'next-webdriver'
import { join } from 'path'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '..')
const nextConfig = join(appDir, 'next.config.js')
let app
......
/* eslint-env jest */
/* global jasmine */
import cheerio from 'cheerio'
import fs from 'fs-extra'
import {
......@@ -12,7 +12,7 @@ import {
} from 'next-test-utils'
import { join } from 'path'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '..')
const appPage = join(appDir, 'pages/_app.js')
const indexPage = join(appDir, 'pages/index.js')
......
/* eslint-env jest */
/* global jasmine */
import fs from 'fs-extra'
import { join } from 'path'
import cheerio from 'cheerio'
......@@ -12,7 +12,7 @@ import {
nextStart,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '..')
const nextConfig = join(appDir, 'next.config.js')
......
/* eslint-env jest */
/* global jasmine */
import path from 'path'
import { nextBuild } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jest.setTimeout(1000 * 60 * 2)
const appDir = path.join(__dirname, '..')
describe('Handle non-page in pages when target: serverless', () => {
......
/* eslint-env jest */
/* global jasmine */
import path from 'path'
import { nextBuild } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
jest.setTimeout(1000 * 60 * 5)
const appDir = path.join(__dirname, '..')
describe('Handles Errors During Export', () => {
......
/* eslint-env jest */
/* global jasmine */
import path from 'path'
import fs from 'fs-extra'
import webdriver from 'next-webdriver'
......@@ -12,7 +12,7 @@ import {
check,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '..')
let app
let appPort
......
/* eslint-env jest */
/* global jasmine */
import path from 'path'
import webdriver from 'next-webdriver'
import {
......@@ -10,7 +10,7 @@ import {
killApp,
} from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '..')
let app
let appPort
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment