Skip to content

Test cleanup#1037

Open
ionous wants to merge 9 commits intomainfrom
test-cleanup
Open

Test cleanup#1037
ionous wants to merge 9 commits intomainfrom
test-cleanup

Conversation

@ionous
Copy link
Contributor

@ionous ionous commented Feb 20, 2026

minor changes to the test data generation
( part of improving things for potentially changing the table format )

ex. use testData.expectError where possible
previously, since the test data was generated as it wrote to the database, different timings of the database writes could generate different data. this generates all the data first, and then writes that data.

i also separated the data logging -- which cleans up the code slightly -- the command line make fake data can log without having to worry about the tests generating logs ( and mucking up the test output )
probably from a global find and replace from the command line parameters lookup
@ionous
Copy link
Contributor Author

ionous commented Mar 20, 2026

adds a custom "test runner" so that we can specify command line parameters to run specific tests.
for example, to run ical tests: npm test -- -pattern="ical"
( documented in testing.md )
node's test runner doesn't allow that in a simple way ( re: nodejs/node#51384 )


misc:

  • fixes the timing of test db startup and destroy
  • puts the fake data generation into a transaction for no particular reason ( speeds the generation a tad )
  • allows the tests to set specific pkids when desired
  • minor improvements to use test helper function for tests that are expected to fail
  • cleans out unused imports in a couple of files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant