Skip to content

Commit 8952673

Browse files
committed
sot in the dark
1 parent 4eb7b13 commit 8952673

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/test.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ jobs:
2727
with:
2828
node-version: ${{ matrix.node-version }}
2929
- run: npm install
30+
- run: cd test/fixtures/sample && npm install
31+
- run: cd test/fixtures/sample && npm run build
3032
- run: npm test

test/index.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const changeCwd = function (cwd) {
3535
// Move .next from sample project to current directory
3636
const moveNextDist = function () {
3737
// Use copySync because cpx won't copy hidden files
38-
fs.copySync(`${FIXTURES_DIR}/next_dist`, `.next`)
38+
fs.copySync(`${FIXTURES_DIR}/sample/.next`, `.next`)
3939
}
4040

4141
// Copy fixture files to the current directory
@@ -45,12 +45,12 @@ const useFixture = async function (fixtureName) {
4545
}
4646

4747
// Build the sample project before running the tests
48-
// beforeAll(async () => {
49-
// await execa('next', ['build'], {
50-
// cwd: `${FIXTURES_DIR}/sample`,
51-
// preferLocal: true,
52-
// })
53-
// }, 180 * 1000) // timeout after 180 seconds
48+
beforeAll(async () => {
49+
return await execa('next', ['build'], {
50+
cwd: `${FIXTURES_DIR}/sample`,
51+
preferLocal: true,
52+
})
53+
}, 180 * 1000) // timeout after 180 seconds
5454

5555
// In each test, we change cwd to a temporary directory.
5656
// This allows us not to have to mock filesystem operations.

0 commit comments

Comments
 (0)