docs: run tests in repl (#14206)

This commit is contained in:
yqrashawn 2022-10-21 16:02:30 +08:00 committed by GitHub
parent 0cbd3ec805
commit 2bfc57281a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 0 deletions

View File

@ -15,5 +15,26 @@ To watch the tests:
make test-watch
```
To run test in REPL
```
make test
yarn shadow-cljs cljs-repl test # or start the REPL in your editor
```
Then start the test process with
```
node --require ./test-resources/override.js target/test/test.js --repl
```
You can run single test in REPL like this
```clojure
(require 'cljs.test)
(cljs.test/test-var #'status-im.data-store.chats-test/normalize-chat-test)
```
Tests will use the bindings in `modules/react-native-status/nodejs`, if you make any changes to these you will need to restart the watcher.