apollo-server
apollo-server copied to clipboard
Tests require a rebuild per test run (version 4)
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.
Note that this isn't a regression from AS3, but still would be nice to improve.