Skip to content

TODO: more tests #26

@nathanjhood

Description

@nathanjhood

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededtest runnerChanges to unit test files and the test runner.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions