You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure it is the place for it, but I don't know if there is a possibility to give a tree to ts-morph. I don't find any documentation for tests and I know some issues are open about it, but if it would be possible to give a mock tree to ts-morph, instead of it taking the tree of the workspace by default, it would greatly help!
For more context, I'm using nx and create a fake tree with it to not test my repository, but only my fake tree.
Something like:
import { createTree } from '@nx/devkit/testing';
import { Project } from 'ts-morph';
const tree = createTree();
const project = new Project({ customTree: tree });
project.addSourceFileAtPath('any/file/path.ts');
The text was updated successfully, but these errors were encountered:
meliecool
changed the title
[Question] Give tree
[Question] Give tree to ts-morph
Dec 9, 2024
Hi,
Not sure it is the place for it, but I don't know if there is a possibility to give a tree to ts-morph. I don't find any documentation for tests and I know some issues are open about it, but if it would be possible to give a mock tree to ts-morph, instead of it taking the tree of the workspace by default, it would greatly help!
For more context, I'm using nx and create a fake tree with it to not test my repository, but only my fake tree.
Something like:
The text was updated successfully, but these errors were encountered: