astro/packages/astro/test/astro-slot-with-client.test.js
Matthew Phillips 1f890b3363
Yield out potentional slot instructions when rendering dynamic tags (#4981)
* Yield out potentional slot instructions when rendering dynamic tags

* Adding a changeset

* yield instead of return

* Handle the fact that renderComponent returns an iterable

* Only yield out html once
2022-10-05 16:30:43 -04:00

19 lines
547 B
JavaScript

import { expect } from 'chai';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
describe('Slots with client: directives', () => {
/** @type {import('./test-utils').Fixture} */
let fixture;
before(async () => {
fixture = await loadFixture({ root: './fixtures/astro-slot-with-client/' });
await fixture.build();
});
it('Tags of dynamic tags works', async () => {
const html = await fixture.readFile('/index.html');
const $ = cheerio.load(html);
expect($('script')).to.have.a.lengthOf(1);
});
});