mirror of
https://github.com/status-im/reagent.git
synced 2025-01-12 21:05:20 +00:00
Add shadow-cljs test configuration
This commit is contained in:
parent
7a974ecccd
commit
d663f3b53e
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ reagent.iml
|
||||
|
||||
node_modules
|
||||
junit
|
||||
.shadow-cljs
|
||||
|
@ -15,6 +15,7 @@
|
||||
"karma-chrome-launcher": "2.2.0",
|
||||
"karma-cljs-test": "0.1.0",
|
||||
"karma-junit-reporter": "1.2.0",
|
||||
"md5-file": "4.0.0"
|
||||
"md5-file": "4.0.0",
|
||||
"shadow-cljs": "2.8.67"
|
||||
}
|
||||
}
|
||||
|
9
shadow-cljs.edn
Normal file
9
shadow-cljs.edn
Normal file
@ -0,0 +1,9 @@
|
||||
{:source-paths ["src" "test"]
|
||||
:builds {:test {:target :karma
|
||||
:output-to "target/shadow-cljs/resources/public/js/karma.js"
|
||||
:output-dir "target/shadow-cljs/resources/public/js"
|
||||
:asset-path "js"
|
||||
:source-map true
|
||||
:compiler-options {:infer-externs :auto}
|
||||
:ns-regexp "(reagenttest\\.test.*|reagent\\..*-test)"}}
|
||||
:dependencies []}
|
15
test-environments/shadow-cljs-prod/karma.conf.js
Normal file
15
test-environments/shadow-cljs-prod/karma.conf.js
Normal file
@ -0,0 +1,15 @@
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
browsers: ['ChromeHeadless'],
|
||||
basePath: '../../target/shadow-cljs/resources/public/js/',
|
||||
files: ['karma.js'],
|
||||
frameworks: ['cljs-test'],
|
||||
plugins: ['karma-cljs-test', 'karma-chrome-launcher'],
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
client: {
|
||||
args: ['shadow.test.karma.init'],
|
||||
singleRun: true
|
||||
}
|
||||
});
|
||||
};
|
5
test-environments/shadow-cljs-prod/test.sh
Executable file
5
test-environments/shadow-cljs-prod/test.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
npx shadow-cljs release test
|
||||
test -f target/shadow-cljs/resources/public/js/karma.js
|
||||
karma start test-environments/shadow-cljs-prod/karma.conf.js --single-run
|
Loading…
x
Reference in New Issue
Block a user