(options?: {
config?: Record<string, unknown>;
root?: string;
})
| 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(); |