mirror of https://github.com/status-im/reagent.git
Run all tests on their own directories
This allows running figwheel on main folder, without node_modules from tests messing the environment.
This commit is contained in:
parent
46d0e9d701
commit
14c43e066f
|
@ -19,3 +19,5 @@ outsite/bundle.js
|
|||
outsite/bundle.min.js
|
||||
node_modules
|
||||
pre-render
|
||||
|
||||
test-environments/*/outsite
|
||||
|
|
29
circle.yml
29
circle.yml
|
@ -7,32 +7,7 @@ dependencies:
|
|||
override:
|
||||
- lein deps
|
||||
- npm install -g karma-cli
|
||||
- npm install
|
||||
- ./prepare-tests.sh
|
||||
test:
|
||||
override:
|
||||
# Cljsjs - browser
|
||||
- rm -rf node_modules/react node_modules/react-dom node_modules/create-react-class node_modules/@cljs-oss
|
||||
- lein with-profile test do clean, doo chrome-headless client once
|
||||
- test -f out/cljsjs/react/development/react.inc.js
|
||||
|
||||
# Cljsjs - browser - React 16
|
||||
- lein with-profile react-16,test do clean, doo chrome-headless client once
|
||||
- test -f out/cljsjs/react/development/react.inc.js
|
||||
|
||||
# Cljsjs - Production build - Browser
|
||||
- lein with-profile prod-test do clean, doo chrome-headless client once
|
||||
|
||||
# Node Modules - Browser
|
||||
- npm install
|
||||
- lein with-profile test do clean, doo chrome-headless client once
|
||||
- test -f out/node_modules/react/react.js
|
||||
|
||||
# Node Modules - Node Target
|
||||
- lein with-profile node-test do clean, doo node client once
|
||||
- test ! -f out/node_modules/react/index.js
|
||||
- grep "reagent.impl.template.node\$module\$react = require('react')" out/reagent/impl/template.js
|
||||
|
||||
# Node Modules - Browser - React 16
|
||||
- npm install react@16.0.0 react-dom@16.0.0
|
||||
- lein with-profile test do clean, doo chrome-headless client once
|
||||
- test -f out/node_modules/react/index.js
|
||||
- ./run-tests.sh
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
for env in test-environments/*; do
|
||||
(
|
||||
cd "$env"
|
||||
npm install
|
||||
)
|
||||
done
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Kill all subshells with ctrl-c
|
||||
trap "kill 0" SIGINT
|
||||
|
||||
reset='\033[0m'
|
||||
blue='\033[0;34m'
|
||||
red='\033[0;31m'
|
||||
|
||||
EXIT=0
|
||||
|
||||
for env in test-environments/*; do
|
||||
FAIL=0
|
||||
name=$(basename "$env")
|
||||
(
|
||||
cd "$env"
|
||||
echo -e "$blue##"
|
||||
echo -e "## TESTING $name"
|
||||
echo -e "##$reset"
|
||||
echo
|
||||
./test.sh
|
||||
)
|
||||
[[ $? != "0" ]] && FAIL=1
|
||||
if [[ $FAIL != "0" ]]; then
|
||||
echo
|
||||
echo -e "$red!! FAIL $name$reset"
|
||||
EXIT=1
|
||||
fi
|
||||
echo
|
||||
echo
|
||||
done
|
||||
|
||||
exit $EXIT
|
|
@ -0,0 +1 @@
|
|||
../../demo
|
|
@ -0,0 +1 @@
|
|||
../../examples
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@cljs-oss/module-deps": "1.1.1",
|
||||
"create-react-class": "^15.6.2",
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"karma": "^1.7.1",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-cljs-test": "^0.1.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
../../project.clj
|
|
@ -0,0 +1 @@
|
|||
../../src
|
|
@ -0,0 +1 @@
|
|||
../../test
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
lein with-profile test do clean, doo chrome-headless client once
|
||||
test -f out/node_modules/react/index.js
|
|
@ -0,0 +1 @@
|
|||
../../demo
|
|
@ -0,0 +1 @@
|
|||
../../examples
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@cljs-oss/module-deps": "1.1.1",
|
||||
"create-react-class": "^15.6.2",
|
||||
"react": "^15.6.2",
|
||||
"react-dom": "^15.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"karma": "^1.7.1",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-cljs-test": "^0.1.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
../../project.clj
|
|
@ -0,0 +1 @@
|
|||
../../src
|
|
@ -0,0 +1 @@
|
|||
../../test
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
lein with-profile test do clean, doo chrome-headless client once
|
||||
test -f out/node_modules/react/react.js
|
|
@ -0,0 +1 @@
|
|||
../../demo
|
|
@ -0,0 +1 @@
|
|||
../../examples
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
../browser-umd/package.json
|
|
@ -0,0 +1 @@
|
|||
../../project.clj
|
|
@ -0,0 +1 @@
|
|||
../../src
|
|
@ -0,0 +1 @@
|
|||
../../test
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
lein with-profile prod-test do clean, doo chrome-headless client once
|
|
@ -0,0 +1 @@
|
|||
../../demo
|
|
@ -0,0 +1 @@
|
|||
../../examples
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
../browser-umd/package.json
|
|
@ -0,0 +1 @@
|
|||
../../project.clj
|
|
@ -0,0 +1 @@
|
|||
../../src
|
|
@ -0,0 +1 @@
|
|||
../../test
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
lein with-profile react-16,test do clean, doo chrome-headless client once
|
||||
test -f out/cljsjs/react/development/react.inc.js
|
|
@ -0,0 +1 @@
|
|||
../../demo
|
|
@ -0,0 +1 @@
|
|||
../../examples
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"karma": "^1.7.1",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-cljs-test": "^0.1.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
../../project.clj
|
|
@ -0,0 +1 @@
|
|||
../../src
|
|
@ -0,0 +1 @@
|
|||
../../test
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
lein with-profile test do clean, doo chrome-headless client once
|
||||
test -f out/cljsjs/react/development/react.inc.js
|
|
@ -0,0 +1 @@
|
|||
../../demo
|
|
@ -0,0 +1 @@
|
|||
../../examples
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@cljs-oss/module-deps": "1.1.1",
|
||||
"create-react-class": "^15.6.2",
|
||||
"react": "^15.6.2",
|
||||
"react-dom": "^15.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"karma": "^1.7.1",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-cljs-test": "^0.1.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
../../project.clj
|
|
@ -0,0 +1 @@
|
|||
../../src
|
|
@ -0,0 +1 @@
|
|||
../../test
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
lein with-profile node-test do clean, doo node client once
|
||||
test ! -f out/node_modules/react/index.js
|
||||
grep "reagent.impl.template.node\$module\$react = require('react')" out/reagent/impl/template.js
|
Loading…
Reference in New Issue