MCPcopy
hub / github.com/mswjs/msw / init

Function init

test/e2e/cli-init.node.test.ts:43–54  ·  view source on GitHub ↗
(inlineArgs: Array<string>)

Source from the content-addressed store, hash-verified

41})
42
43async function init(inlineArgs: Array<string>): ReturnType<typeof fsMock.exec> {
44 const result = await fsMock.exec(
45 `node ${CLI_PATH} init ${inlineArgs.join(' ')}`,
46 )
47
48 return {
49 ...result,
50 // Strip stdout from color unicode characters:
51 stdout: result.stdout.replace(/\x1b\[\d+m/gi, ''),
52 stderr: result.stderr.replace(/\x1b\[\d+m/gi, ''),
53 }
54}
55
56test('copies the script to a given path without saving', async () => {
57 await fsMock.create({

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…