When you're using a testing framework, do you prefer your test declarations to be global variables like Mocha or Jest? Or to have explicit imports like Ava? import test from 'ava'; test('title', () => {}); vs. // global.test test('title', () => {});
-
-
The more you tamper with global state, the more you alter the program being tested. As a result, can you trust your tests?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I don't know why anyone would use globals in an import/export world, they only made sense in like the pre-module Hella Old Days
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
import { describe, it } from “framework” Not hard to copy paste a single line. No magic.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
It could be a hybdrid solution, use the same globals as jest but also allow import new utilities
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 