turf icon indicating copy to clipboard operation
turf copied to clipboard

Update nx config for tests

Open mfedderly opened this issue 1 year ago • 2 comments

This fixes an issue where nx would cache test runs even if the underlying files have changed. This only happens if you execute tests like so:

pnpm lerna run test --scope=@turf/meta

This invokes the lerna/nx caching layer, and this will miss the fact that the actual code itself changed which should cause the tests to rerun. To fix this I extracted the source file inputs into a named input, and then used that in both build and test so that everything stays in sync.

mfedderly avatar Aug 07 '24 16:08 mfedderly

This might not be worth merging if we're taking #2682 instead, or it would at least need to be revisited.

mfedderly avatar Aug 08 '24 16:08 mfedderly

I reworked this to just not conflict with that PR, we can merge this safely now.

mfedderly avatar Aug 08 '24 17:08 mfedderly

Thanks for this @mfedderly 👍

smallsaucepan avatar May 17 '25 02:05 smallsaucepan