apollo-server icon indicating copy to clipboard operation
apollo-server copied to clipboard

Tests require a rebuild per test run (version 4)

Open trevor-scheer opened this issue 3 years ago • 1 comments

It seems like our pretest script might not be necessary if ts-jest/jest were configured properly.

My first suspicion starts with the .js imports - it seems like since these reference dist files, that is a non-starter for a no-rebuild-necessary test config. Maybe a babel transform as part of the test config to remove the .js extensions would be a place to start?

Right now, npm test works since it triggers a rebuild via the pretest script. This means that npm run test:watch doesn't actually "work" - i.e. code changes trigger test reruns but not the currently necessary project rebuilds. Running a tsc watch alongside your npm run test:watch hides the issue effectively and makes this workflow possible.

trevor-scheer avatar Jul 11 '22 21:07 trevor-scheer

Note that this isn't a regression from AS3, but still would be nice to improve.

glasser avatar Jul 11 '22 21:07 glasser