astro/packages/astro/test/multiple-renderers.test.js
Matthew Phillips 09eca9be5e
Only rethrow renderer error when no renderer found (#4131)
* Only rethrow renderer error when no renderer found

* Adds a changeset
2022-08-03 14:33:31 -04:00

21 lines
586 B
JavaScript

import { expect } from 'chai';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
describe('Multiple renderers', () => {
/** @type {import('./test-utils').Fixture} */
let fixture;
before(async () => {
fixture = await loadFixture({
root: './fixtures/multiple-renderers/',
});
await fixture.build();
});
it('when the first throws but the second does not, use the second renderer', async () => {
const html = await fixture.readFile('/index.html');
const $ = cheerio.load(html);
expect($('#component')).to.have.a.lengthOf(1);
});
});