Skip to content

Commit 5361528

Browse files
committed
move /test/fixtures/sample to /test/sample
1 parent e5b5980 commit 5361528

File tree

18 files changed

+18
-13
lines changed

18 files changed

+18
-13
lines changed

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +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
30+
- run: cd test/sample && npm install
31+
- run: cd test/sample && npm run build
3232
- run: npm test

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
### Node ###
2+
3+
# Test
4+
test/sample/node_modules
5+
test/sample/out_functions
6+
test/sample/netlify-automatic-functions
7+
test/sample/my-publish-dir
8+
test/sample/.next
9+
test/sample/.netlify
10+
211
# Logs
312
logs
413
*.log

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ node_modules
1919
# Test
2020
__mocks__
2121
test/fixtures/
22+
test/sample

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
"jest": {
5858
"testMatch": [
5959
"**/test/**/*.js",
60-
"!**/test/fixtures/**"
60+
"!**/test/fixtures/**",
61+
"!**/test/sample/**"
6162
],
6263
"verbose": true
6364
}

test/fixtures/sample/.gitignore

-7
This file was deleted.

test/index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const plugin = require('..')
1313
const pCopy = promisify(copy)
1414

1515
const FIXTURES_DIR = `${__dirname}/fixtures`
16+
const SAMPLE_PROJECT_DIR = `${__dirname}/sample`
1617

1718
const utils = {
1819
run: {
@@ -35,7 +36,7 @@ const changeCwd = function (cwd) {
3536
// Move .next from sample project to current directory
3637
const moveNextDist = function () {
3738
// Use copySync because cpx won't copy hidden files
38-
fs.copySync(`${FIXTURES_DIR}/sample/.next`, `.next`)
39+
fs.copySync(`${SAMPLE_PROJECT_DIR}/.next`, `.next`)
3940
}
4041

4142
// Copy fixture files to the current directory
@@ -46,8 +47,8 @@ const useFixture = async function (fixtureName) {
4647

4748
// Build the sample project before running the tests
4849
beforeAll(async () => {
49-
return await execa('next', ['build'], {
50-
cwd: `${FIXTURES_DIR}/sample`,
50+
await execa('next', ['build'], {
51+
cwd: SAMPLE_PROJECT_DIR,
5152
preferLocal: true,
5253
})
5354
}, 180 * 1000) // timeout after 180 seconds
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)