forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement new core test API (vercel#44086)
Adds a new way to write e2e tests for the Next.js core, mostly to reduce common boilerplate and make it easier to write tests for now team members. ```ts // test/e2e/app-dir/head/head.test.ts import { createNextDescribe } from 'e2e-utils' createNextDescribe( 'app dir head', { files: __dirname }, ({ next }) => { test('handles ', async () => { // get cheerio (jQuery like API to traverse HTML) const $ = await next.render$('/') // get html const html = await next.render('/') // use fetch const res = await next.fetch('/') // get browser const browser = await next.browser('/') }) })
- Loading branch information
1 parent
79f56f0
commit f6ccccd
Showing
3 changed files
with
130 additions
and
53 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
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