Skip to content

Commit 54e551b

Browse files
committed
chore: use demo for tests instead of test/sample
1 parent a9d74ea commit 54e551b

File tree

9 files changed

+11
-30
lines changed

9 files changed

+11
-30
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"prepublishOnly:pull": "git pull",
2525
"prepublishOnly:install": "npm ci",
2626
"prepublishOnly:test": "npm test",
27-
"test": "next build test/sample && jest",
27+
"test": "next build demo && jest",
28+
"test:withoutbuild": "jest",
2829
"prepare": "npm run build",
2930
"clean": "rimraf lib",
3031
"build": "unbuild"

test/__snapshots__/index.js.snap

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
exports[`onBuild() writes correct redirects to netlifyConfig 1`] = `
44
"/_next/image* /_ipx/w_:width,q_:quality/:url 301
55
/_ipx/* /.netlify/functions/_ipx 200
6+
/_next/data/I9WsDBcMY6HmfxTpCRMvs/getStaticProps/withFallback/:id.json /.netlify/functions/___netlify-odb-handler 200
7+
/_next/data/I9WsDBcMY6HmfxTpCRMvs/getStaticProps/withFallback/:slug/* /.netlify/functions/___netlify-odb-handler 200
8+
/_next/data/I9WsDBcMY6HmfxTpCRMvs/getStaticProps/withFallbackBlocking/:id.json /.netlify/functions/___netlify-odb-handler 200
9+
/_next/data/I9WsDBcMY6HmfxTpCRMvs/getStaticProps/withRevalidate/withFallback/:id.json /.netlify/functions/___netlify-odb-handler 200
10+
/getStaticProps/withFallback/:id /.netlify/functions/___netlify-odb-handler 200
11+
/getStaticProps/withFallback/:slug/* /.netlify/functions/___netlify-odb-handler 200
12+
/getStaticProps/withFallbackBlocking/:id /.netlify/functions/___netlify-odb-handler 200
13+
/getStaticProps/withRevalidate/withFallback/:id /.netlify/functions/___netlify-odb-handler 200
614
/_next/static/* /static/:splat 200
715
/* /.netlify/functions/___netlify-handler 200
816
"

test/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const getNextConfig = require('../src/helpers/getNextConfig')
1313
const usesBuildCommand = require('../src/helpers/usesBuildCommand')
1414

1515
const FIXTURES_DIR = `${__dirname}/fixtures`
16-
const SAMPLE_PROJECT_DIR = `${__dirname}/sample`
16+
const SAMPLE_PROJECT_DIR = `${__dirname}/../demo`
1717

1818
const utils = {
1919
build: {

test/sample/.eslintrc

-4
This file was deleted.

test/sample/netlify.toml

-6
This file was deleted.

test/sample/next.config.js

-1
This file was deleted.

test/sample/pages/_app.js

-5
This file was deleted.

test/sample/pages/api/test.js

-5
This file was deleted.

test/sample/pages/index.js

-7
This file was deleted.

0 commit comments

Comments
 (0)