• Iñaki Baz Castillo's avatar
    Make Node tests independent (part 2) (#1296) · e51b47bd
    由 Iñaki Baz Castillo 提交于
    - Just done in `test-Router.ts` as POC.
    - Avoid declaring global variables in test files. Put them into `ctx: TestContext` instead.
    - Things in `ctx` should be const/frozen or reset in each `test()` execution.
    - So use a new `utils.deepFreeze()` function which freezes the object and would throw upon any  modification attempt.
    e51b47bd
utils.ts 4.4 KB