Skip to content

Commit ffc1558

Browse files
committed
chore: test folder
1 parent dc76af7 commit ffc1558

File tree

8 files changed

+409
-157
lines changed

8 files changed

+409
-157
lines changed

β€Ž.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
dist/
33
node_modules/
44
storybook-static/
5-
e2e/*app
5+
test/e2e/*app

β€Ž.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ coverage/
1616
.idea
1717
yarn-error.log
1818
.size-snapshot.json
19-
e2e/*app
19+
test/e2e/*app
2020
__diff_output__

β€Žpackage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"eslint:ci": "eslint .",
4747
"prettier": "prettier --check .",
4848
"prettier-fix": "prettier --write .",
49-
"test": "npm run eslint:ci && ./test-e2e.sh",
49+
"test": "npm run eslint:ci && (cd test/e2e; ./e2e.sh)",
5050
"typecheck": "tsc --noEmit --emitDeclarationOnly false --strict --jsx react",
5151
"typegen": "tsc --emitDeclarationOnly",
5252
"storybook": "NODE_OPTIONS=\"--openssl-legacy-provider\" storybook dev -p 6006",

β€Že2e/App.jsx renamed to β€Žtest/e2e/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Suspense, useEffect } from 'react'
22
import { Canvas } from '@react-three/fiber'
3-
import { Box, Environment, CameraControls } from '@react-three/drei'
3+
import { Box, Environment, CameraControls } from '@react-three/drei' // eslint-disable-line import/no-unresolved
44

55
function App() {
66
return (

β€Žtest-e2e.sh renamed to β€Žtest/e2e/e2e.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -ex
33

44
PORT=5188
55

6-
(cd dist && npm pack)
6+
(cd ../../dist; npm pack)
77

88
kill_app() {
99
kill $(lsof -ti:$PORT)
@@ -20,23 +20,23 @@ kill_app || echo "ok, no previous running process on port $PORT"
2020
# β•šβ•β•β•β• β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β•β•
2121
#
2222

23-
rm -rf e2e/viteapp
23+
rm -rf viteapp
2424

2525
# Vite
26-
(cd e2e; npm create vite@latest viteapp -- --template react)
26+
npm create vite@latest viteapp -- --template react
2727

2828
# drei
29-
(cd e2e/viteapp; npm i; npm i ../../dist/react-three-drei-0.0.0-semantic-release.tgz)
29+
(cd viteapp; npm i; npm i ../../../dist/react-three-drei-0.0.0-semantic-release.tgz)
3030

3131
# App.jsx
32-
cp e2e/App.jsx e2e/viteapp/src/App.jsx
32+
cp App.jsx viteapp/src/App.jsx
3333

3434
# npm run dev + jest
35-
(cd e2e/viteapp; npm run build; npm run preview -- --port $PORT &)
36-
npx jest e2e/snapshot.test.js || kill_app
35+
(cd viteapp; npm run build; npm run preview -- --port $PORT &)
36+
npx jest snapshot.test.js || kill_app
3737
kill_app
3838

39-
rm -rf e2e/viteapp
39+
rm -rf viteapp
4040

4141
#
4242
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
@@ -47,23 +47,23 @@ rm -rf e2e/viteapp
4747
# β•šβ•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β•
4848
#
4949

50-
rm -rf e2e/craapp
50+
rm -rf craapp
5151

5252
# CRA
53-
(cd e2e; npx create-react-app craapp)
53+
npx create-react-app craapp
5454

5555
# drei
56-
(cd e2e/craapp; npm i ../../dist/react-three-drei-0.0.0-semantic-release.tgz)
56+
(cd craapp; npm i ../../../dist/react-three-drei-0.0.0-semantic-release.tgz)
5757

5858
# App.jsx
59-
cp e2e/App.jsx e2e/craapp/src/App.js
59+
cp App.jsx craapp/src/App.js
6060

6161
# npm run dev + jest
62-
(cd e2e/craapp; npm run build; npx serve -s -p $PORT build &)
63-
npx jest e2e/snapshot.test.js || kill_app
62+
(cd craapp; npm run build; npx serve -s -p $PORT build &)
63+
npx jest snapshot.test.js || kill_app
6464
kill_app
6565

66-
rm -rf e2e/craapp
66+
rm -rf craapp
6767

6868
#
6969
# Teardown
File renamed without changes.

0 commit comments

Comments
Β (0)