Skip to content

Commit 71b39d4

Browse files
committed
make tests work correctly
1 parent 78f16af commit 71b39d4

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

rewatch/tests/compile.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cd ../testrepo
55

66
bold "Test: It should compile"
77

8-
if rewatch clean ;
8+
if rewatch clean &> /dev/null;
99
then
1010
success "Repo Cleaned"
1111
else

rewatch/tests/lock.sh

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ exit_watcher() {
1919
}
2020

2121
rewatch_bg watch > /dev/null 2>&1 &
22-
echo "Started watcher in background"
2322

2423
sleep 1
2524

rewatch/tests/suite-ci.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export REWATCH_EXECUTABLE
1313
source ./utils.sh
1414

1515
bold "Rescript version"
16-
(cd ../testrepo && yarn rescript -v)
16+
(cd ../testrepo && ./node_modules/.bin/rescript -v)
1717

1818
# we need to reset the yarn.lock and package.json to the original state
1919
# so there is not diff in git. The CI will install new ReScript package
2020
bold "Reset package.json and yarn.lock"
21-
git checkout ../testrepo/yarn.lock
22-
git checkout ../testrepo/package.json
21+
git checkout ../testrepo/yarn.lock &> /dev/null
22+
git checkout ../testrepo/package.json &> /dev/null
2323
success "Reset package.json and yarn.lock"
2424

2525
bold "Make sure the testrepo is clean"

rewatch/tests/utils.sh

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ success() { echo -e "- ✅ \033[32m$1\033[0m"; }
44
error() { echo -e "- 🛑 \033[31m$1\033[0m"; }
55
bold() { echo -e "\033[1m$1\033[0m"; }
66
rewatch() { RUST_BACKTRACE=1 $REWATCH_EXECUTABLE --no-timing=true $@; }
7+
rewatch_bg() { RUST_BACKTRACE=1 nohup $REWATCH_EXECUTABLE --no-timing=true $@; }
78

89
replace() {
910
if [[ $OSTYPE == 'darwin'* ]];

rewatch/tests/watch.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cd ../testrepo
33

44
bold "Test: It should watch"
55

6-
if rewatch clean ;
6+
if rewatch clean &> /dev/null;
77
then
88
success "Repo Cleaned"
99
else
@@ -16,7 +16,7 @@ exit_watcher() {
1616
rm lib/rewatch.lock
1717
}
1818

19-
rewatch watch &
19+
rewatch_bg watch > /dev/null 2>&1 &
2020
success "Watcher Started"
2121

2222
echo 'Js.log("added-by-test")' >> ./packages/main/src/Main.res

0 commit comments

Comments
 (0)