From 21c9f5df97e4a2080b049d2ca45c460c8da76c5b Mon Sep 17 00:00:00 2001 From: Jeff Williams Date: Sat, 20 Jan 2024 21:46:38 -0800 Subject: [PATCH] fix(jsdoc-core): remove ill-conceived test Running the legacy template in a test has too many potential side effects. (Also, it wasn't working, because the JSDoc environment was missing some data.) --- packages/jsdoc-core/test/specs/lib/api.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/packages/jsdoc-core/test/specs/lib/api.js b/packages/jsdoc-core/test/specs/lib/api.js index a0894867..4d36eef6 100644 --- a/packages/jsdoc-core/test/specs/lib/api.js +++ b/packages/jsdoc-core/test/specs/lib/api.js @@ -200,20 +200,6 @@ describe('Api', () => { expect(env.docletStore).toBe(fakeDocletStore); }); - it('uses the legacy template by default', async () => { - options.template = null; - - try { - await instance.generateDocs(); - - // We shouldn't get here. - expect(false).toBeTrue(); - } catch (e) { - expect(e.message).toContain('default template'); - expect(e.message).toContain('@jsdoc/template-legacy'); - } - }); - it('rejects the promise and logs a fatal error if the template cannot be found', async () => { spyOn(env.log, 'fatal'); options.template = 'fleeble';