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

     1  import {
     2      html,
     3      fixture,
     4      defineCE,
     5      unsafeStatic,
     6      expect,
     7  } from '@open-wc/testing';
     8  import { TestgridGridColumnHeader } from '../src/testgrid-grid-column-header';
     9  
    10  describe('TestGrid grid column header', () => {
    11      let element: TestgridGridColumnHeader;
    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 TestgridGridColumnHeader { });
    16          const tag = unsafeStatic(tagName);
    17          element = await fixture(html`<${tag}></${tag}>`);
    18      });
    19  
    20      it('passes the a11y audit', async () => {
    21          expect(element).shadowDom.to.be.accessible();
    22      });
    23  
    24      it('can instantiate an element', async () => {
    25          expect(element).to.exist;
    26      });
    27  });