diff --git a/packages/jsdoc/test/specs/jsdoc/util/templateHelper.js b/packages/jsdoc/test/specs/jsdoc/util/templateHelper.js
index 4f45ace8..5a77626f 100644
--- a/packages/jsdoc/test/specs/jsdoc/util/templateHelper.js
+++ b/packages/jsdoc/test/specs/jsdoc/util/templateHelper.js
@@ -1168,7 +1168,7 @@ describe('jsdoc/util/templateHelper', () => {
];
it('should prune the correct members', () => {
- const pruned = helper.prune(taffy(array))().get();
+ const pruned = helper.prune(taffy(array), jsdoc.deps)().get();
compareObjectArrays(keep, pruned);
});
@@ -1177,7 +1177,7 @@ describe('jsdoc/util/templateHelper', () => {
let pruned;
options.private = false;
- pruned = helper.prune(taffy(arrayPrivate))().get();
+ pruned = helper.prune(taffy(arrayPrivate), jsdoc.deps)().get();
compareObjectArrays([], pruned);
});
@@ -1187,7 +1187,7 @@ describe('jsdoc/util/templateHelper', () => {
const keepPackage = [{ access: 'package' }];
options.access = 'package';
- pruned = helper.prune(taffy(arrayMixed))().get();
+ pruned = helper.prune(taffy(arrayMixed), jsdoc.deps)().get();
compareObjectArrays(keepPackage, pruned);
});
@@ -1197,7 +1197,7 @@ describe('jsdoc/util/templateHelper', () => {
const keepPublic = [{ access: 'public' }];
options.access = 'public';
- pruned = helper.prune(taffy(arrayMixed))().get();
+ pruned = helper.prune(taffy(arrayMixed), jsdoc.deps)().get();
compareObjectArrays(keepPublic, pruned);
});
@@ -1207,7 +1207,7 @@ describe('jsdoc/util/templateHelper', () => {
const keepUndefined = [{ asdf: true }];
options.access = 'undefined';
- pruned = helper.prune(taffy(arrayMixed))().get();
+ pruned = helper.prune(taffy(arrayMixed), jsdoc.deps)().get();
compareObjectArrays(keepUndefined, pruned);
});
@@ -1217,7 +1217,7 @@ describe('jsdoc/util/templateHelper', () => {
const keepProtected = [{ access: 'protected' }];
options.access = 'protected';
- pruned = helper.prune(taffy(arrayMixed))().get();
+ pruned = helper.prune(taffy(arrayMixed), jsdoc.deps)().get();
compareObjectArrays(keepProtected, pruned);
});
@@ -1227,7 +1227,7 @@ describe('jsdoc/util/templateHelper', () => {
const keepPrivate = [{ access: 'private' }];
options.access = 'private';
- pruned = helper.prune(taffy(arrayMixed))().get();
+ pruned = helper.prune(taffy(arrayMixed), jsdoc.deps)().get();
compareObjectArrays(keepPrivate, pruned);
});
@@ -1244,7 +1244,7 @@ describe('jsdoc/util/templateHelper', () => {
];
options.access = ['public', 'protected'];
- pruned = helper.prune(taffy(arrayMixed))().get();
+ pruned = helper.prune(taffy(arrayMixed), jsdoc.deps)().get();
compareObjectArrays(keepPublicProtected, pruned);
});
@@ -1253,7 +1253,7 @@ describe('jsdoc/util/templateHelper', () => {
let pruned;
options.access = 'all';
- pruned = helper.prune(taffy(arrayMixed))().get();
+ pruned = helper.prune(taffy(arrayMixed), jsdoc.deps)().get();
compareObjectArrays(arrayMixed, pruned);
});
@@ -1262,7 +1262,7 @@ describe('jsdoc/util/templateHelper', () => {
let pruned;
options.private = true;
- pruned = helper.prune(taffy(arrayPrivate))().get();
+ pruned = helper.prune(taffy(arrayPrivate), jsdoc.deps)().get();
compareObjectArrays(arrayPrivate, pruned);
});
@@ -1300,21 +1300,21 @@ describe('jsdoc/util/templateHelper', () => {
it('should translate {@link test} into a HTML link.', () => {
const input = 'This is a {@link test}.';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('This is a test.');
});
it('should translate {@link unknown} into a simple text.', () => {
const input = 'This is a {@link unknown}.';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('This is a unknown.');
});
it('should translate {@link test} into a HTML links multiple times.', () => {
const input = 'This is a {@link test} and {@link test}.';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe(
'This is a test and test.'
@@ -1323,21 +1323,21 @@ describe('jsdoc/util/templateHelper', () => {
it('should translate [hello there]{@link test} into a HTML link with the custom content.', () => {
const input = 'This is a [hello there]{@link test}.';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('This is a hello there.');
});
it('should translate [dummy text] and [hello there]{@link test} into an HTML link with the custom content.', () => {
const input = 'This is [dummy text] and [hello there]{@link test}.';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('This is [dummy text] and hello there.');
});
it('should translate [dummy text] and [more] and [hello there]{@link test} into an HTML link with the custom content.', () => {
const input = 'This is [dummy text] and [more] and [hello there]{@link test}.';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe(
'This is [dummy text] and [more] and hello there.'
@@ -1346,105 +1346,105 @@ describe('jsdoc/util/templateHelper', () => {
it('should ignore [hello there].', () => {
const input = 'This is a [hello there].';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe(input);
});
it('should translate http links in the tag', () => {
const input = 'Link to {@link http://github.com}';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to http://github.com');
});
it('should translate ftp links in the tag', () => {
const input = 'Link to {@link ftp://foo.bar}';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to ftp://foo.bar');
});
it('should allow pipe to be used as delimiter between href and text (external link)', () => {
const input = 'Link to {@link http://github.com|Github}';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to Github');
});
it('should allow pipe to be used as delimiter between href and text (symbol link)', () => {
const input = 'Link to {@link test|Test}';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to Test');
});
it('should allow first space to be used as delimiter between href and text (external link)', () => {
const input = 'Link to {@link http://github.com Github}';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to Github');
});
it('should allow first space to be used as delimiter between href and text (symbol link)', () => {
const input = 'Link to {@link test My Caption}';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to My Caption');
});
it('if pipe and space are present in link tag, use pipe as the delimiter', () => {
const input = 'Link to {@link test|My Caption}';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to My Caption');
});
it('Test of {@linkcode } which should be in monospace', () => {
const input = 'Link to {@linkcode test}';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to test');
});
it('Test of {@linkplain } which should be in normal font', () => {
const input = 'Link to {@linkplain test}';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to test');
});
it('should be careful with linking to links whose names are reserved JS keywords', () => {
const input = 'Link to {@link constructor}';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to constructor');
});
it('should allow linebreaks between link tag and content', () => {
const input = 'This is a {@link\ntest}.';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('This is a test.');
});
it('should allow linebreaks to separate url from link text', () => {
const input = 'This is a {@link\ntest\ntest}.';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('This is a test.');
});
it('should normalize additional newlines to spaces', () => {
const input = 'This is a {@link\ntest\ntest\n\ntest}.';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('This is a test test.');
});
it('should allow tabs between link tag and content', () => {
const input = 'This is a {@link\ttest}.';
- const output = helper.resolveLinks(input);
+ const output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('This is a test.');
});
@@ -1456,7 +1456,7 @@ describe('jsdoc/util/templateHelper', () => {
let output;
config.templates.monospaceLinks = true;
- output = helper.resolveLinks(input);
+ output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to test');
});
@@ -1467,7 +1467,7 @@ describe('jsdoc/util/templateHelper', () => {
let output;
config.templates.monospaceLinks = true;
- output = helper.resolveLinks(input);
+ output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to test');
});
@@ -1477,7 +1477,7 @@ describe('jsdoc/util/templateHelper', () => {
let output;
config.templates.monospaceLinks = true;
- output = helper.resolveLinks(input);
+ output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to test');
});
@@ -1489,7 +1489,7 @@ describe('jsdoc/util/templateHelper', () => {
let output;
config.templates.cleverLinks = true;
- output = helper.resolveLinks(input);
+ output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to test');
});
@@ -1499,7 +1499,7 @@ describe('jsdoc/util/templateHelper', () => {
let output;
config.templates.cleverLinks = true;
- output = helper.resolveLinks(input);
+ output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to http://github.com');
});
@@ -1510,7 +1510,7 @@ describe('jsdoc/util/templateHelper', () => {
let output;
config.templates.cleverLinks = true;
- output = helper.resolveLinks(input);
+ output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to test');
});
@@ -1520,7 +1520,7 @@ describe('jsdoc/util/templateHelper', () => {
let output;
config.templates.cleverLinks = true;
- output = helper.resolveLinks(input);
+ output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to test');
});
@@ -1533,7 +1533,7 @@ describe('jsdoc/util/templateHelper', () => {
config.templates.cleverLinks = true;
config.templates.monospaceLinks = true;
- output = helper.resolveLinks(input);
+ output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe(
'Link to test and ' +
@@ -1547,7 +1547,7 @@ describe('jsdoc/util/templateHelper', () => {
config.templates.useShortNamesInLinks = true;
helper.registerLink('my.long.namespace', 'asdf.html');
- output = helper.resolveLinks(input);
+ output = helper.resolveLinks(input, jsdoc.deps);
expect(output).toBe('Link to namespace');
});