MCPcopy
hub / github.com/mozilla/web-ext / execProgram

Function execProgram

tests/unit/test.program.js:33–50  ·  view source on GitHub ↗
(program, options = {})

Source from the content-addressed store, hash-verified

31
32describe('program.Program', () => {
33 function execProgram(program, options = {}) {
34 const fakeProcess = createFakeProcess();
35 const absolutePackageDir = path.join(
36 moduleURLToDirname(import.meta.url),
37 '..',
38 '..',
39 );
40 if (program.absolutePackageDir == null) {
41 program.absolutePackageDir = absolutePackageDir;
42 }
43 return program.execute({
44 getVersion: async () => 'not-a-real-version',
45 checkForUpdates: spy(),
46 systemProcess: fakeProcess,
47 shouldExitProgram: false,
48 ...options,
49 });
50 }
51
52 it('executes a command callback', () => {
53 const thing = spy(() => Promise.resolve());

Callers 3

test.program.jsFile · 0.85
testWatchFileOptionFunction · 0.85
testWatchIgnoredOptionFunction · 0.85

Calls 4

createFakeProcessFunction · 0.90
moduleURLToDirnameFunction · 0.90
mainFunction · 0.90
executeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…