We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c740f4e commit e5b723cCopy full SHA for e5b723c
rewatch/tests/format.sh
@@ -42,3 +42,18 @@ else
42
echo $error_output
43
exit 1
44
fi
45
+
46
+bold "Test: It should format only the current project"
47
48
+error_output=$(cd packages/file-casing && "../../$REWATCH_EXECUTABLE" format)
49
+git_diff_file_count=$(git diff --name-only ./ | wc -l | xargs)
50
+if [ $? -eq 0 ] && [ $git_diff_file_count -eq 2 ];
51
+then
52
+ success "file-casing formatted"
53
+ git restore .
54
+else
55
+ error "Error formatting current project file-casing"
56
+ echo "Expected 2 files to be changed, got $git_diff_file_count"
57
+ echo $error_output
58
+ exit 1
59
+fi
0 commit comments