-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for exportPathMap in development (#4094)
* Add support for exportPathMap in development * Add comment about what it does
- Loading branch information
1 parent
b393833
commit dac2f39
Showing
3 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* global describe, it, expect */ | ||
import webdriver from 'next-webdriver' | ||
|
||
export default function (context) { | ||
describe('Render in development mode', () => { | ||
it('should render the home page', async () => { | ||
const browser = await webdriver(context.port, '/') | ||
const text = await browser | ||
.elementByCss('#home-page p').text() | ||
|
||
expect(text).toBe('This is the home page') | ||
browser.close() | ||
}) | ||
|
||
it('should render pages only existent in exportPathMap page', async () => { | ||
const browser = await webdriver(context.port, '/dynamic/one') | ||
const text = await browser | ||
.elementByCss('#dynamic-page p').text() | ||
|
||
expect(text).toBe('next export is nice') | ||
browser.close() | ||
}) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters