File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 27
27
with :
28
28
node-version : ${{ matrix.node-version }}
29
29
- run : npm install
30
+ - run : cd test/fixtures/sample && npm install
31
+ - run : cd test/fixtures/sample && npm run build
30
32
- run : npm test
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ const changeCwd = function (cwd) {
35
35
// Move .next from sample project to current directory
36
36
const moveNextDist = function ( ) {
37
37
// 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` )
39
39
}
40
40
41
41
// Copy fixture files to the current directory
@@ -45,12 +45,12 @@ const useFixture = async function (fixtureName) {
45
45
}
46
46
47
47
// 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
54
54
55
55
// In each test, we change cwd to a temporary directory.
56
56
// This allows us not to have to mock filesystem operations.
You can’t perform that action at this time.
0 commit comments