From 2bfc57281afb75496c507ab1c7aca9a222271746 Mon Sep 17 00:00:00 2001 From: yqrashawn Date: Fri, 21 Oct 2022 16:02:30 +0800 Subject: [PATCH] docs: run tests in repl (#14206) --- doc/TESTING.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/TESTING.md b/doc/TESTING.md index 02eb75a4bc..29383bbfd9 100644 --- a/doc/TESTING.md +++ b/doc/TESTING.md @@ -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.