Four ways our code avoids importing Electron, and the one file that imports it at the top and takes ten others with it
DEV Community
Four ways our code avoids importing Electron, and the one file that imports it at the top and takes ten others with it
A rule that testable files may not import Electron produces a bridge, a lazy require, a guarded top-level import, and one module that calls app.getPath at import time. Ten modules import that one, which is what decides the testable surface.
0 comments
No comments yet.