Skip to content

test: isolate individual assert test to improve test hygiene

Rodrigo Muino Tomonari requested to merge github/fork/Trott/write-in-tmp into master

First commit:

test: isolate unusual assert test in its own file

test-assert.js contains a test that writes to the source tree, requires
an internal module, and depends on modules not needed by the plethora of
other test cases in the file. Move it to its own file so that there are
not side effects in test-assert.js and so that it can be refactored to
not write to the source tree.

Second commit:

test: improve assert test hygiene

Do not pollute the source tree for the test. Instead of writing to the
source tree, spawn a process with the temp dir as cwd and write the file
there.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading