-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache package lock when running tests to speed up installation (#44520)
- Loading branch information
Showing
3 changed files
with
87 additions
and
28 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 |
---|---|---|
@@ -1,19 +1,14 @@ | ||
import { createNext } from 'e2e-utils' | ||
import { NextInstance } from 'test/lib/next-modes/base' | ||
import { fetchViaHTTP } from 'next-test-utils' | ||
import { createNextDescribe } from 'e2e-utils' | ||
|
||
describe('createNext', () => { | ||
let next: NextInstance | ||
|
||
beforeAll(async () => { | ||
next = await createNext({ | ||
files: __dirname, | ||
createNextDescribe( | ||
'createNextDescribe', | ||
{ | ||
files: __dirname, | ||
}, | ||
({ next }) => { | ||
it('should work', async () => { | ||
const res = await next.fetch('/') | ||
expect(await res.text()).toContain('Hello World') | ||
}) | ||
}) | ||
afterAll(() => next.destroy()) | ||
|
||
it('should work', async () => { | ||
const res = await fetchViaHTTP(next.url, '/') | ||
expect(await res.text()).toContain('Hello World') | ||
}) | ||
}) | ||
} | ||
) |
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