MCPcopy
hub / github.com/teambit/bit / createModuleTestCase

Function createModuleTestCase

src/extensions/flows/task/task.spec.ts:72–85  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

70}
71
72function createModuleTestCase(name: string) {
73 const testCase = getTestCase(name);
74 const main = 'node_modules/@bit/extension/index.js';
75 testCase['node_modules/@bit/extension/index.js'] = `
76 module.exports = function helloModule() {
77 console.log('hello-module')
78 return {
79 message: 'hello-module'
80 }
81 }
82 `;
83 testCase['node_modules/@bit/extension/package.json'] = JSON.stringify({ main, name }, null, 2);
84 return testCase;
85}
86
87function getErrorCase(id: string) {
88 const testCase = getTestCase(id);

Callers

nothing calls this directly

Calls 2

getTestCaseFunction · 0.70
stringifyMethod · 0.45

Tested by

no test coverage detected