mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore: Download tests to temporary folder.
This commit is contained in:
parent
78e175f627
commit
a141b563e9
@ -7,3 +7,6 @@ coverage
|
||||
**/*.js
|
||||
**/*.d.ts
|
||||
**/*.js.map
|
||||
|
||||
# ignore temporary test files
|
||||
test/tmp
|
||||
|
10
.gitignore
vendored
10
.gitignore
vendored
@ -1,16 +1,18 @@
|
||||
.idea
|
||||
|
||||
node_modules
|
||||
coverage
|
||||
|
||||
*.js
|
||||
*.js.map
|
||||
*.d.ts
|
||||
components
|
||||
|
||||
.eslintcache
|
||||
|
||||
!.eslintrc.js
|
||||
!test/eslintrc.js
|
||||
|
||||
!jest.config.js
|
||||
|
||||
components
|
||||
solid-crud-tests
|
||||
coverage
|
||||
|
||||
test/tmp
|
||||
|
@ -7,7 +7,7 @@ module.exports = {
|
||||
"transform": {
|
||||
"^.+\\.ts$": "ts-jest"
|
||||
},
|
||||
"testRegex": "/test/.*\\.test\\.ts$",
|
||||
"testRegex": "/test/(unit|integration)/.*\\.test\\.ts$",
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"js"
|
||||
|
@ -1,14 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Start server
|
||||
npm start &
|
||||
PID=$!
|
||||
|
||||
# Initialize tests
|
||||
pushd test/tmp
|
||||
rm -rf solid-crud-tests
|
||||
git clone https://github.com/solid/solid-crud-tests
|
||||
cd solid-crud-tests
|
||||
git checkout v0.1.1
|
||||
npm install
|
||||
npm ci
|
||||
|
||||
# Run tests
|
||||
export SERVER_ROOT=http://localhost:3000
|
||||
export ALICE_WEBID_DOC=$SERVER_ROOT/profile.ttl
|
||||
export ALICE_WEBID=$ALICE_WEBID#me
|
||||
curl -X PUT $ALICE_WEBID_DOC -d '<#me> <http://www.w3.org/ns/pim/space#storage> </>.'
|
||||
npm run jest
|
||||
|
||||
# Clean up
|
||||
kill $PID
|
||||
popd
|
||||
|
0
test/tmp/.gitkeep
Normal file
0
test/tmp/.gitkeep
Normal file
@ -20,6 +20,6 @@
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"test/system"
|
||||
"test/tmp"
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user