Skip to content

Commit b4fdc3a

Browse files
committed
tests: update snapshots
1 parent 214f58e commit b4fdc3a

File tree

10 files changed

+53
-13
lines changed

10 files changed

+53
-13
lines changed

rewatch/testrepo/packages/deprecated-config/rescript.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@testrepo/deprecated-config",
3+
"namespace": true,
34
"sources": {
45
"dir": "src",
56
"subdirs": true

rewatch/tests/compile.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,47 +38,44 @@ node ./packages/main/src/Main.mjs > ./packages/main/src/output.txt
3838

3939
mv ./packages/main/src/Main.res ./packages/main/src/Main2.res
4040
rewatch build --snapshot-output &> ../tests/snapshots/rename-file.txt
41+
normalize_paths ../tests/snapshots/rename-file.txt
4142
mv ./packages/main/src/Main2.res ./packages/main/src/Main.res
4243

4344
# Rename a file with a dependent - this should trigger an error
4445
mv ./packages/main/src/InternalDep.res ./packages/main/src/InternalDep2.res
4546
rewatch build --snapshot-output &> ../tests/snapshots/rename-file-internal-dep.txt
46-
# normalize paths so the snapshot is the same on all machines
4747
normalize_paths ../tests/snapshots/rename-file-internal-dep.txt
4848
mv ./packages/main/src/InternalDep2.res ./packages/main/src/InternalDep.res
4949

5050
# Rename a file with a dependent in a namespaced package - this should trigger an error (regression)
5151
mv ./packages/new-namespace/src/Other_module.res ./packages/new-namespace/src/Other_module2.res
5252
rewatch build --snapshot-output &> ../tests/snapshots/rename-file-internal-dep-namespace.txt
53-
# normalize paths so the snapshot is the same on all machines
5453
normalize_paths ../tests/snapshots/rename-file-internal-dep-namespace.txt
5554
mv ./packages/new-namespace/src/Other_module2.res ./packages/new-namespace/src/Other_module.res
5655

5756
rewatch build &> /dev/null
5857
mv ./packages/main/src/ModuleWithInterface.resi ./packages/main/src/ModuleWithInterface2.resi
5958
rewatch build --snapshot-output &> ../tests/snapshots/rename-interface-file.txt
60-
# normalize paths so the snapshot is the same on all machines
6159
normalize_paths ../tests/snapshots/rename-interface-file.txt
6260
mv ./packages/main/src/ModuleWithInterface2.resi ./packages/main/src/ModuleWithInterface.resi
6361
rewatch build &> /dev/null
6462
mv ./packages/main/src/ModuleWithInterface.res ./packages/main/src/ModuleWithInterface2.res
6563
rewatch build --snapshot-output &> ../tests/snapshots/rename-file-with-interface.txt
66-
# normalize paths so the snapshot is the same on all machines
6764
normalize_paths ../tests/snapshots/rename-file-with-interface.txt
6865
mv ./packages/main/src/ModuleWithInterface2.res ./packages/main/src/ModuleWithInterface.res
6966
rewatch build &> /dev/null
7067

7168
# when deleting a file that other files depend on, the compile should fail
7269
rm packages/dep02/src/Dep02.res
7370
rewatch build --snapshot-output &> ../tests/snapshots/remove-file.txt
74-
# normalize paths so the snapshot is the same on all machines
7571
normalize_paths ../tests/snapshots/remove-file.txt
7672
git checkout -- packages/dep02/src/Dep02.res
7773
rewatch build &> /dev/null
7874

7975
# it should show an error when we have a dependency cycle
8076
echo 'Dep01.log()' >> packages/new-namespace/src/NS_alias.res
8177
rewatch build --snapshot-output &> ../tests/snapshots/dependency-cycle.txt
78+
normalize_paths ../tests/snapshots/dependency-cycle.txt
8279
git checkout -- packages/new-namespace/src/NS_alias.res
8380

8481
# it should compile dev dependencies with the --dev flag

rewatch/tests/snapshots/dependency-cycle.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
Cleaned 0/15
1+
WARN:
2+
Deprecated use of field 'bs-dependencies' found in /packages/deprecated-config/rescript.json.
3+
Use 'dependencies' instead. This field will be removed in a future version.
4+
WARN:
5+
Deprecated use of field 'bs-dev-dependencies' found in /packages/deprecated-config/rescript.json.
6+
Use 'dev-dependencies' instead. This field will be removed in a future version.
7+
Cleaned 0/16
28
Parsed 1 source files
39
Compiled 0 modules
410

rewatch/tests/snapshots/remove-file.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
Cleaned 1/15
1+
WARN:
2+
Deprecated use of field 'bs-dependencies' found in /packages/deprecated-config/rescript.json.
3+
Use 'dependencies' instead. This field will be removed in a future version.
4+
WARN:
5+
Deprecated use of field 'bs-dev-dependencies' found in /packages/deprecated-config/rescript.json.
6+
Use 'dev-dependencies' instead. This field will be removed in a future version.
7+
Cleaned 1/16
28
Parsed 0 source files
39
Compiled 1 modules
410

rewatch/tests/snapshots/rename-file-internal-dep-namespace.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
Cleaned 2/15
1+
WARN:
2+
Deprecated use of field 'bs-dependencies' found in /packages/deprecated-config/rescript.json.
3+
Use 'dependencies' instead. This field will be removed in a future version.
4+
WARN:
5+
Deprecated use of field 'bs-dev-dependencies' found in /packages/deprecated-config/rescript.json.
6+
Use 'dev-dependencies' instead. This field will be removed in a future version.
7+
Cleaned 2/16
28
Parsed 2 source files
39
Compiled 3 modules
410

rewatch/tests/snapshots/rename-file-internal-dep.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
Cleaned 2/15
1+
WARN:
2+
Deprecated use of field 'bs-dependencies' found in /packages/deprecated-config/rescript.json.
3+
Use 'dependencies' instead. This field will be removed in a future version.
4+
WARN:
5+
Deprecated use of field 'bs-dev-dependencies' found in /packages/deprecated-config/rescript.json.
6+
Use 'dev-dependencies' instead. This field will be removed in a future version.
7+
Cleaned 2/16
28
Parsed 2 source files
39
Compiled 2 modules
410

rewatch/tests/snapshots/rename-file-with-interface.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
WARN:
2+
Deprecated use of field 'bs-dependencies' found in /packages/deprecated-config/rescript.json.
3+
Use 'dependencies' instead. This field will be removed in a future version.
4+
WARN:
5+
Deprecated use of field 'bs-dev-dependencies' found in /packages/deprecated-config/rescript.json.
6+
Use 'dev-dependencies' instead. This field will be removed in a future version.
17
 No implementation file found for interface file (skipping): src/ModuleWithInterface.resi
2-
Cleaned 2/15
8+
Cleaned 2/16
39
Parsed 1 source files
410
Compiled 2 modules
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
Cleaned 1/15
1+
WARN:
2+
Deprecated use of field 'bs-dependencies' found in /packages/deprecated-config/rescript.json.
3+
Use 'dependencies' instead. This field will be removed in a future version.
4+
WARN:
5+
Deprecated use of field 'bs-dev-dependencies' found in /packages/deprecated-config/rescript.json.
6+
Use 'dev-dependencies' instead. This field will be removed in a future version.
7+
Cleaned 1/16
28
Parsed 1 source files
39
Compiled 1 modules

rewatch/tests/snapshots/rename-interface-file.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
WARN:
2+
Deprecated use of field 'bs-dependencies' found in /packages/deprecated-config/rescript.json.
3+
Use 'dependencies' instead. This field will be removed in a future version.
4+
WARN:
5+
Deprecated use of field 'bs-dev-dependencies' found in /packages/deprecated-config/rescript.json.
6+
Use 'dev-dependencies' instead. This field will be removed in a future version.
17
 No implementation file found for interface file (skipping): src/ModuleWithInterface2.resi
2-
Cleaned 1/15
8+
Cleaned 1/16
39
Parsed 1 source files
410
Compiled 2 modules

rewatch/tests/suffix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fi
3131
# Count files with new extension
3232
file_count=$(find ./packages -name *.res.js | wc -l)
3333

34-
if [ "$file_count" -eq 26 ];
34+
if [ "$file_count" -eq 28 ];
3535
then
3636
success "Found files with correct suffix"
3737
else

0 commit comments

Comments
 (0)