Created
June 7, 2019 13:28
-
-
Save Tallyb/1169b8cb0938d5e95365755470c54f99 to your computer and use it in GitHub Desktop.
Basic component test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { newSpecPage } from "@stencil/core/dist/testing"; | |
import { MyBasic } from './basic'; | |
describe('basic', () => { | |
it('should render', async () => { | |
const page = await newSpecPage({ | |
html: `<my-basic first="Julia" last="Roberts"></my-basic>`, | |
components: [MyBasic] | |
}); | |
expect(page.root).toEqualHtml(` | |
<my-basic first=\"Julia\" last=\"Roberts\"> | |
<mock:shadow-root> | |
<p> | |
My name is Roberts Julia | |
</p> | |
</mock:shadow-root> | |
</my-basic> | |
`); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment