MCPcopy
hub / github.com/jestjs/jest / createEmptyPackage

Function createEmptyPackage

e2e/Utils.ts:242–255  ·  view source on GitHub ↗
(
  directory: string,
  packageJson: PackageJson = DEFAULT_PACKAGE_JSON,
)

Source from the content-addressed store, hash-verified

240};
241
242export const createEmptyPackage = (
243 directory: string,
244 packageJson: PackageJson = DEFAULT_PACKAGE_JSON,
245) => {
246 const packageJsonWithDefaults = {
247 ...packageJson,
248 description: 'THIS IS AN AUTOGENERATED FILE AND SHOULD NOT BE ADDED TO GIT',
249 };
250 fs.mkdirSync(directory, {recursive: true});
251 fs.writeFileSync(
252 path.resolve(directory, 'package.json'),
253 JSON.stringify(packageJsonWithDefaults, null, 2),
254 );
255};
256
257export const extractSummary = (stdout: string) => {
258 const match = stdout

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected