diff --git a/tests/compile.sh b/tests/compile.sh index cd32424..2697d27 100755 --- a/tests/compile.sh +++ b/tests/compile.sh @@ -39,11 +39,15 @@ mv ./packages/main/src/Main2.res ./packages/main/src/Main.res # Rename a file with a dependent - this should trigger an error mv ./packages/main/src/InternalDep.res ./packages/main/src/InternalDep2.res rewatch build --no-timing=true &> ../tests/snapshots/rename-file-internal-dep.txt +# replace the absolute path so the snapshot is the same on all machines +replace "s/$(pwd | sed "s/\//\\\\\//g")//g" ../tests/snapshots/rename-file-internal-dep.txt mv ./packages/main/src/InternalDep2.res ./packages/main/src/InternalDep.res # Rename a file with a dependent in a namespaced package - this should trigger an error (regression) mv ./packages/new-namespace/src/Other_module.res ./packages/new-namespace/src/Other_module2.res rewatch build --no-timing=true &> ../tests/snapshots/rename-file-internal-dep-namespace.txt +# replace the absolute path so the snapshot is the same on all machines +replace "s/$(pwd | sed "s/\//\\\\\//g")//g" ../tests/snapshots/rename-file-internal-dep-namespace.txt mv ./packages/new-namespace/src/Other_module2.res ./packages/new-namespace/src/Other_module.res rewatch build &> /dev/null diff --git a/tests/snapshots/rename-file-internal-dep-namespace.txt b/tests/snapshots/rename-file-internal-dep-namespace.txt index b071f1c..5230dcf 100644 --- a/tests/snapshots/rename-file-internal-dep-namespace.txt +++ b/tests/snapshots/rename-file-internal-dep-namespace.txt @@ -7,7 +7,7 @@  [7/7] ️🛑 Compiled 3 modules in 0.00s We've found a bug for you! - /Users/jfrolich/development/rewatch/testrepo/packages/new-namespace/src/NS_alias.res:2:1-16 + /packages/new-namespace/src/NS_alias.res:2:1-16 1 │ let hello_world = () => "Hello world" 2 │ Other_module.bla() diff --git a/tests/snapshots/rename-file-internal-dep.txt b/tests/snapshots/rename-file-internal-dep.txt index 739ea7d..c22caa4 100644 --- a/tests/snapshots/rename-file-internal-dep.txt +++ b/tests/snapshots/rename-file-internal-dep.txt @@ -7,7 +7,7 @@  [7/7] ️🛑 Compiled 2 modules in 0.00s We've found a bug for you! - /Users/jfrolich/development/rewatch/testrepo/packages/main/src/Main.res:4:8-24 + /packages/main/src/Main.res:4:8-24 2 │ Dep01.log() 3 │