Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ggodlewski committed Sep 19, 2023
1 parent 292a6fd commit b30dda3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/containers/transform/TransformContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export class TransformContainer extends Container {
}

async run(rootFolderId: FileId) {
if (!this.userConfigService.config.transform_subdir.startsWith('/')) {
if (!(this.userConfigService.config.transform_subdir || '').startsWith('/')) {
this.logger.warn('Content subdirectory must be set and start with /');
return;
}
Expand Down
6 changes: 3 additions & 3 deletions test/markdownToHtmlTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ describe('markdownToHtml', () => {
map[elem.attribs.src] = convertToAbsolutePath('/aaa/bbb/ccc.md', elem.attribs.src);
}

assert.equals(map['./Doc1.svg'], '/aaa/bbb/Doc1.svg');
assert.equals(map['Doc2.svg'], '/aaa/bbb/Doc2.svg');
assert.equals(map['../subdir/Diagram.svgg'], '/aaa/subdir/Diagram.svg');
assert.equal(map['./Doc1.svg'], '/aaa/bbb/Doc1.svg');
assert.equal(map['Doc2.svg'], '/aaa/bbb/Doc2.svg');
assert.equal(map['../subdir/Diagram.svgg'], '/aaa/subdir/Diagram.svg');

const serilzd = render(dom);
console.log(serilzd);
Expand Down

0 comments on commit b30dda3

Please sign in to comment.