Files
compiler-explorer/test/handlers/site-templates-tests.ts
Matt Godbolt fd3dd917f5 Vitest (#6219)
Port to vitest. Port everything to typescript. Remove chai, mocha and
chai-as-promised. Adds some docs.
2024-03-08 22:25:09 -06:00

17 lines
560 B
TypeScript

import {beforeAll, describe, expect, it} from 'vitest';
import {getSiteTemplates, loadSiteTemplates} from '../../lib/handlers/site-templates.js';
describe('Site Templates Backend', () => {
beforeAll(() => {
loadSiteTemplates('etc/config');
});
it('should load site templates properly', () => {
const templates = getSiteTemplates();
// not super comprehensive
expect(templates.meta).toHaveProperty('meta.screenshot_dimentions');
expect(Object.entries(templates.templates).length).toBeTruthy();
});
});