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

Function testWatchFileOption

tests/unit/test.program.js:560–570  ·  view source on GitHub ↗
(watchFile)

Source from the content-addressed store, hash-verified

558 });
559
560 async function testWatchFileOption(watchFile) {
561 const fakeCommands = fake(commands, {
562 run: () => Promise.resolve(),
563 });
564
565 return execProgram(['run', '--watch-file', ...watchFile], {
566 commands: fakeCommands,
567 }).then(() => {
568 sinon.assert.calledWithMatch(fakeCommands.run, { watchFile });
569 });
570 }
571
572 it('calls run with a watched file', () => {
573 testWatchFileOption(['path/to/fake/file.txt']);

Callers 1

test.program.jsFile · 0.85

Calls 2

fakeFunction · 0.90
execProgramFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…