MCPcopy Create free account
hub / github.com/code-pushup/cli / setupProjectJson

Function setupProjectJson

packages/nx-plugin/src/plugin/utils.unit.test.ts:10–21  ·  view source on GitHub ↗
(options?: {
    config?: Record<string, unknown>;
    root?: string;
  })

Source from the content-addressed store, hash-verified

8 `${MEMFS_VOLUME}/${projectRoot}${projectRoot ? '/' : ''}project.json`;
9
10 const setupProjectJson = (options?: {
11 config?: Record<string, unknown>;
12 root?: string;
13 }) => {
14 const { config = { name: 'my-project' }, root = '' } = options ?? {};
15 vol.fromJSON(
16 {
17 [`${root}${root ? '/' : ''}project.json`]: JSON.stringify(config),
18 },
19 MEMFS_VOLUME,
20 );
21 };
22
23 it('should provide workspaceRoot', async () => {
24 setupProjectJson();

Callers 1

utils.unit.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected