import { newSpecPage } from '@stencil/core/testing'; import { MyComponent } from './my-component'; describe('my-component', () => { it('renders', async () => { const { root } = await newSpecPage({ components: [MyComponent], html: '', }); expect(root).toEqualHtml(`
Hello, World! I'm
`); }); it('renders with values', async () => { const { root } = await newSpecPage({ components: [MyComponent], html: ``, }); expect(root).toEqualHtml(`
Hello, World! I'm Stencil 'Don't call me a framework' JS
`); }); });