glennsl/rescript-jest

Snapshot removed by bucklescript -clean-world

Closed this issue · 2 comments

When I run bsb -clean-world all files inside lib/ directory will be removed (including .snap file generated by jest). This means I can't do clean + build + test on CI because the snapshot is removed and jest won't create new snapshot on CI (as it should).

Do you have suggestion how to handle this? For now I'm only running build + test on CI. Or is that the recommended approach?

Have you tried using the in-source option for bucklescript instead? Then the snapshot files would be put outside lib/, and should not be removed by -clean-world.

You're right, using in-source option solves this problem. Still prefer output in lib/ but this works

Thank you!