Skip to content

Instantly share code, notes, and snippets.

Last active September 11, 2023 03:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Test that greeter is a web component with a shadow DOM
import { Greeter } from './index';
describe('greeter', () => {
beforeAll(() => {
customElements.define('yag-greeter', Greeter);
it('should be defined', () => {
it ('should set a shadow DOM with mode open', () => {
customElements.define('yag-greeter', Greeter);
const greeter = document.createElement('yag-greeter');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment