i want to setup cross-runtime unit tests, specifically to run in node.js and bun. do stuff so we can run the suite on node 16, 18, or even earlier things. i moved logger (and all packages) to requiring node 16 as that is the version of node i use personally and can easily test on.
estimate of a list of tests i want
[ ] @paperdave/utils
some tests written, but not with node support
[X] unique
[X] shuffle
[ ] createArray
[ ] moveArrayValue
[ ] removeArrayValue
[ ] insertArrayValue
[ ] range
[ ] debounce
[ ] throttle
[ ] tryOrFallback
[ ] getNativeModule
[ ] pathExists
[ ] readJSONSync
[ ] writeJSONSync
[ ] readJSON
[ ] writeJSON
[ ] ensureDir
[ ] walk
[ ] hashDirectoryContents
[ ] clamp
[ ] lerp
[ ] pipe
[ ] pipeAsync
[ ] delay
[ ] deferred
[ ] asyncMap
[ ] randomInt
[ ] randomFloat
[ ] capitalize
[ ] @paperdave/events
we already have tests with bun:test
[ ] support node.js in the testing.
[ ] @paperdave/logger
some of this might be really hard to test
[ ] logging with info, warn, error, debug, success all produce expected results.
[ ] new Logger
[ ] colorization on custom logs is as expected
[ ] DEBUG env var and setLogFilter works
[ ] Error formatting is as expected
[ ] CLIError and PrintableError work
[ ] LogWidget class
[ ] injectLogger
[ ] withSpinner and withProgress
[ ] eslint-config-dave
not as important but it would be cool to throw some unit tests to sanity check the config
[ ] prettier-config-dave
not as important but it would be cool to throw some unit tests to sanity check the config
i want to setup cross-runtime unit tests, specifically to run in node.js and bun. do stuff so we can run the suite on node 16, 18, or even earlier things. i moved logger (and all packages) to requiring node 16 as that is the version of node i use personally and can easily test on.
estimate of a list of tests i want
@paperdave/utils
unique
shuffle
createArray
moveArrayValue
removeArrayValue
insertArrayValue
range
debounce
throttle
tryOrFallback
getNativeModule
pathExists
readJSONSync
writeJSONSync
readJSON
writeJSON
ensureDir
walk
hashDirectoryContents
clamp
lerp
pipe
pipeAsync
delay
deferred
asyncMap
randomInt
randomFloat
capitalize
@paperdave/events
bun:test
@paperdave/logger
info
,warn
,error
,debug
,success
all produce expected results.new Logger
DEBUG
env var andsetLogFilter
worksCLIError
andPrintableError
workLogWidget
classinjectLogger
withSpinner
andwithProgress
eslint-config-dave
prettier-config-dave