Skip to content

Commit

Permalink
fix a test after correcting that message
Browse files Browse the repository at this point in the history
  • Loading branch information
alicewriteswrongs committed Jun 23, 2023
1 parent e6fc4e3 commit ad3c602
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/compiler/transformers/test/type-library.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ describe('type library', () => {
logger.enable();
config.logger = logger;
addFileToLibrary(config, 'fixtures/not-found.ts');
expect(warnMock).toHaveBeenCalledWith('Could not gather type information from "fixtures/not-found.ts"!');
expect(warnMock).toHaveBeenCalledWith(
'docs-json: unable to gather type information from "fixtures/not-found.ts". Please double check this path exists relative to your project root.'
);
teardownConsoleMocks();
});

Expand Down
4 changes: 3 additions & 1 deletion src/compiler/transformers/type-library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ export function addFileToLibrary(config: ValidatedConfig, filePath: string): voi
const sourceFile = program.getSourceFile(filePath);

if (!sourceFile) {
config.logger.warn(`docs-json: unable to gather type information from "${filePath}". Please double check this path exists relative to your project root.`);
config.logger.warn(
`docs-json: unable to gather type information from "${filePath}". Please double check this path exists relative to your project root.`
);
return;
}

Expand Down

0 comments on commit ad3c602

Please sign in to comment.