Skip to content

Commit 060a71f

Browse files
committed
test: retry verify example tag 3 times
1 parent f9dd560 commit 060a71f

File tree

1 file changed

+27
-20
lines changed

1 file changed

+27
-20
lines changed

test/scripts/apidocs/verify-jsdoc-tags.spec.ts

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -164,27 +164,34 @@ ${examples}`;
164164
assertDescription(signature.description);
165165
});
166166

167-
it('verify @example tag', { timeout: 30000 }, async () => {
168-
const examples = signature.examples.join('\n');
169-
170-
expect(
171-
examples,
172-
`${moduleName}.${methodName} to have examples`
173-
).not.toBe('');
174-
175-
// Grab path to example file
176-
const path = resolvePathToMethodFile(
177-
moduleName,
178-
methodName,
179-
signatureIndex
180-
);
167+
it(
168+
'verify @example tag',
169+
{
170+
retry: 3,
171+
timeout: 30000,
172+
},
173+
async () => {
174+
const examples = signature.examples.join('\n');
175+
176+
expect(
177+
examples,
178+
`${moduleName}.${methodName} to have examples`
179+
).not.toBe('');
180+
181+
// Grab path to example file
182+
const path = resolvePathToMethodFile(
183+
moduleName,
184+
methodName,
185+
signatureIndex
186+
);
181187

182-
// Executing the examples should not throw
183-
await expect(
184-
import(`${path}?scope=example`),
185-
examples
186-
).resolves.toBeDefined();
187-
});
188+
// Executing the examples should not throw
189+
await expect(
190+
import(`${path}?scope=example`),
191+
examples
192+
).resolves.toBeDefined();
193+
}
194+
);
188195

189196
// This only checks whether the whole method is deprecated or not
190197
// It does not check whether the method is deprecated for a specific set of arguments

0 commit comments

Comments
 (0)