jest test for void method with side-effects
I have a JS function I want to test:
It doesn't return a value. It just has side-effects (change COLS value and size the matrix.
I export values as below:
My jest test of this function always fails. It's as if initialize() was never called.
Does REPLIT have a testing bug? Must I do some thing different in jest?
hello, please look at this repl: https://replit.com/@Coder100/PassionateQuarterlyExponent-aeouaeou#index.js
it is not a replit bug, its js behavior. The exported object doesn't get changed by the export. Try using some global variables, or make a config object.