Skip to content

Commit 7038ca2

Browse files
committed
test: - simplify callback parameter
1 parent 8c325f1 commit 7038ca2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/Task/LinkResolver.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,15 @@ describe('LinkResolver', () => {
2626

2727
it('should allow a function to be supplied, to find the destination of a link', () => {
2828
const resolver = LinkResolver.getInstance();
29-
resolver.setGetFirstLinkpathDestFn((_rawLink: Reference, _sourcePath: string) => 'Hello World.md');
29+
resolver.setGetFirstLinkpathDestFn(() => 'Hello World.md');
3030

3131
const link = resolver.resolve(rawLink, link_in_file_body.filePath);
3232
expect(link.destinationPath).toEqual('Hello World.md');
3333
});
3434

3535
it('should allow the global instance to be reset', () => {
3636
const globalInstance = LinkResolver.getInstance();
37-
globalInstance.setGetFirstLinkpathDestFn(
38-
(_rawLink: Reference, _sourcePath: string) => 'From Global Instance.md',
39-
);
37+
globalInstance.setGetFirstLinkpathDestFn(() => 'From Global Instance.md');
4038

4139
const link1 = globalInstance.resolve(rawLink, link_in_file_body.filePath);
4240
expect(link1.destinationPath).toEqual('From Global Instance.md');

0 commit comments

Comments
 (0)