Unverified Commit e00b9467 authored by Anderson Leite's avatar Anderson Leite Committed by GitHub

router-is-ready test. Clean up unused vars. (#28723)

Variable `isDev` is not used in both tests.
The tests run dev/prod modes based on the different test scenarios.

## Bug

- [x] Integration tests clean up

## Documentation / Examples

- [x] Make sure the linting passes
parent d310009c
...@@ -18,7 +18,7 @@ let appPort ...@@ -18,7 +18,7 @@ let appPort
const appDir = join(__dirname, '../') const appDir = join(__dirname, '../')
const invalidPage = new File(join(appDir, 'pages/invalid.js')) const invalidPage = new File(join(appDir, 'pages/invalid.js'))
function runTests(isDev) { function runTests() {
it('isReady should be true immediately for pages without getStaticProps', async () => { it('isReady should be true immediately for pages without getStaticProps', async () => {
const browser = await webdriver(appPort, '/appGip') const browser = await webdriver(appPort, '/appGip')
expect(await browser.eval('window.isReadyValues')).toEqual([true]) expect(await browser.eval('window.isReadyValues')).toEqual([true])
...@@ -51,7 +51,7 @@ describe('router.isReady with appGip', () => { ...@@ -51,7 +51,7 @@ describe('router.isReady with appGip', () => {
invalidPage.restore() invalidPage.restore()
}) })
runTests(true) runTests()
}) })
describe('production mode', () => { describe('production mode', () => {
......
...@@ -18,7 +18,7 @@ let appPort ...@@ -18,7 +18,7 @@ let appPort
const appDir = join(__dirname, '../') const appDir = join(__dirname, '../')
const invalidPage = new File(join(appDir, 'pages/invalid.js')) const invalidPage = new File(join(appDir, 'pages/invalid.js'))
function runTests(isDev) { function runTests() {
it('isReady should be true immediately for getInitialProps page', async () => { it('isReady should be true immediately for getInitialProps page', async () => {
const browser = await webdriver(appPort, '/gip') const browser = await webdriver(appPort, '/gip')
expect(await browser.eval('window.isReadyValues')).toEqual([true]) expect(await browser.eval('window.isReadyValues')).toEqual([true])
...@@ -81,7 +81,7 @@ describe('router.isReady', () => { ...@@ -81,7 +81,7 @@ describe('router.isReady', () => {
invalidPage.restore() invalidPage.restore()
}) })
runTests(true) runTests()
}) })
describe('production mode', () => { describe('production mode', () => {
......
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