github.com/GoogleCloudPlatform/testgrid@v0.0.174/web/test/testgrid-grid-row-name.test.ts (about)

     1  import {
     2    html,
     3    fixture,
     4    defineCE,
     5    unsafeStatic,
     6    expect,
     7  } from '@open-wc/testing';
     8  import { TestgridGridRowName } from '../src/testgrid-grid-row-name';
     9  
    10  describe('TestGrid grid row name', () => {
    11    let element: TestgridGridRowName;
    12    beforeEach(async () => {
    13      // Need to wrap an element to apply its properties (ex. @customElement)
    14      // See https://open-wc.org/docs/testing/helpers/#test-a-custom-class-with-properties
    15      const tagName = defineCE(class extends TestgridGridRowName {});
    16      const tag = unsafeStatic(tagName);
    17      element = await fixture(html`<${tag}></${tag}>`);
    18    });
    19    it('passes the a11y audit', async () => {
    20      expect(element).shadowDom.to.be.accessible();
    21    });
    22  
    23    it('can instantiate an element', async () => {
    24      expect(element).to.exist;
    25    });
    26  });