Tests we need:
- the client-side getters -
src/config/get*.ts - all need some basic IO tests
- the import tests could all be moved into same-level
index.test.ts and run before the file-specific tests, such that those are skipped if their import tests fail
Tests we don't really need:
- server-side helper stuff that just wraps NodeJS methods in
src/process/parse*.ts, since mostly these are so simple that we wouldn't be testing anything that team NodeJS didn't already test (and more thoroughly)
Tests I'm unsure about:
- anything that mutates the running
process, such as env file loaders. It is not always possible - or clear how - to designate a process-to-use for functions such as process.loadEnvFile (that one seems not to care which process it is called from and only mutates the global one). In that case, running the tests would morph the actual test runner process, which is obviously a serious no-go
Additionally:
- should probably create some files under the
test subtree to hold mock definitions of things like process
- if any JSX were to end up in this sub-tree, it would probably cause havock because
esbuild-scripts is not a React project itself; perhaps some tests could be moved further up the tree into a create-esbuild-react-app, which does not yet exist
- consider moving tests into the module-scope's top-level as arrow functions, then call these functions in the top-level
test.suite, to enhance readability and better (?) contextual handling
Tests we need:
src/config/get*.ts- all need some basic IO testsindex.test.tsand run before the file-specific tests, such that those are skipped if their import tests failTests we don't really need:
src/process/parse*.ts, since mostly these are so simple that we wouldn't be testing anything that team NodeJS didn't already test (and more thoroughly)Tests I'm unsure about:
process, such as env file loaders. It is not always possible - or clear how - to designate aprocess-to-use for functions such asprocess.loadEnvFile(that one seems not to care whichprocessit is called from and only mutates the global one). In that case, running the tests would morph the actual test runnerprocess, which is obviously a serious no-goAdditionally:
testsubtree to hold mock definitions of things likeprocessesbuild-scriptsis not a React project itself; perhaps some tests could be moved further up the tree into acreate-esbuild-react-app, which does not yet existtest.suite, to enhance readability and better (?) contextual handling