MCPcopy
hub / github.com/webpack/webpack / close

Function close

test/WatchClose.test.js:52–60  ·  view source on GitHub ↗

* @param {import("../").Watching} watcher watcher * @param {(err?: null | Error) => void} callback callback * @returns {Promise<void>}

(watcher, callback)

Source from the content-addressed store, hash-verified

50 * @returns {Promise<void>}
51 */
52 function close(watcher, callback) {
53 return new Promise((res) => {
54 const onClose = () => {
55 callback();
56 res();
57 };
58 watcher.close(onClose);
59 });
60 }
61
62 it("each callback should be called", async () => {
63 let num = 0;

Callers 1

WatchClose.test.jsFile · 0.70

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected