File tree Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Original file line number Diff line number Diff line change 1+ 57150
Original file line number Diff line number Diff line change 1+ source " ./utils.sh"
2+ cd ../testrepo
3+
4+ bold " Test: It should support custom suffixes"
5+
6+ # Clean Repo
7+ sleep 1
8+ if rewatch clean & > /dev/null;
9+ then
10+ success " Repo Cleaned"
11+ else
12+ error " Error Cleaning Repo"
13+ exit 1
14+ fi
15+
16+ # Replace suffix
17+ replace " s/.mjs/.res.js/g" bsconfig.json
18+
19+ if rewatch build & > /dev/null;
20+ then
21+ success " Repo Built"
22+ else
23+ error " Error building repo"
24+ exit 1
25+ fi
26+
27+ # Count files with new extension
28+ file_count=$( find . -name * .res.js | wc -l)
29+
30+ if [ " $file_count " -eq 9 ];
31+ then
32+ success " Found files with correct suffix"
33+ else
34+ error " Suffix not correctly used"
35+ exit 1
36+ fi
37+
38+ if rewatch clean & > /dev/null;
39+ then
40+ success " Repo Cleaned"
41+ else
42+ error " Error Cleaning Repo"
43+ exit 1
44+ fi
45+
46+ # Restore Suffix
47+ replace " s/.res.js/.mjs/g" bsconfig.json
48+
49+ # Restore original build
50+ if rewatch build & > /dev/null;
51+ then
52+ success " Repo Built"
53+ else
54+ error " Error building repo"
55+ exit 1
56+ fi
Original file line number Diff line number Diff line change 2222 exit 1
2323fi
2424
25- ./compile.sh && ./watch.sh && ./lock.sh
25+ ./compile.sh && ./watch.sh && ./lock.sh && ./suffix.sh
You can’t perform that action at this time.
0 commit comments