-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunner.sh
More file actions
executable file
·28 lines (19 loc) · 842 Bytes
/
runner.sh
File metadata and controls
executable file
·28 lines (19 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
## Check if file to be tested exists and returns a message if it does not
mintjs=$(./mintjs src/App.tsx)
if [[ $? != 0 ]]; then
echo "Our tests were unable to run. Please Try again.\n<failed>"
elif [[ $mintjs ]]; then
./mintjs src/App.tsx
else
# /.runner '@1-1'
# This command will run one of the options below for one test in which
# the name pattern is passed as an argument to the script.
# Use this command to run a single test and return test output + set custom message at code labs interface
npm run test -- -t $1 --watchAll=false
# Use this command to run a single test and return custom message from Jest:
# npm run -s task -- -t $1
# How to use it in code labs task:
# npm run -s task --testNamePattern=@1.1
# npm run -s task -- -t @1.1
fi