forked from hyperfiddle/electric
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test scripts - requires npm install
- Loading branch information
Showing
9 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
./run_tests_jvm.sh | ||
./run_tests_node.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
echo "Running Browser tests" | ||
./node_modules/.bin/shadow-cljs -A:test compile :browser-test | ||
./node_modules/.bin/karma start --single-run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/bin/bash | ||
|
||
echo "Running JVM tests" | ||
clojure -X:test :dirs "[\"src\" \"src-docs\" \"test\"]" :patterns "[\"hyperfiddle.photon-impl.*\" \"hyperfiddle.photon-test\"]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
echo "Running NodeJS tests" | ||
./node_modules/.bin/shadow-cljs -A:test compile :test | ||
node out/node-tests.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# How to run tests in a browser during dev time | ||
|
||
## Running once | ||
Use the `run_tests_browser.sh` script. | ||
|
||
## Live reloading | ||
1. Start a watch build for `:browser-test` (either in shadow ui, or `shadow-cljs -A:test watch :browser-test`) | ||
2. Run `./node_modules/.bin/karma start --browsers Chrome` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
process.env.CHROMIUM_BIN = require('puppeteer').executablePath() | ||
module.exports = function (config) { | ||
config.set({ | ||
browsers: ['ChromiumHeadless'], | ||
// The directory where the output file lives | ||
basePath: 'out', | ||
// The file itself | ||
files: ['karma-tests.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 | ||
} | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters