Skip to content

Commit

Permalink
fix: respect namespace in test file
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrich authored and blackfalcon committed Nov 20, 2020
1 parent 5ad9786 commit 08788a8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions template/test/[namespace]-[name].test.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { fixture, html, expect } from '@open-wc/testing';
import sinon from 'sinon';
import '../src/auro-[name].js';
import '../src/[namespace]-[name].js';

describe('auro-[name]', () => {
it('sets the CSS class on auro-[name] > div element', async () => {
describe('[namespace]-[name]', () => {
it('sets the CSS class on [namespace]-[name] > div element', async () => {
const el = await fixture(html`
<auro-[name] cssclass="testClass"></auro-[name]>
<[namespace]-[name] cssclass="testClass"></[namespace]-[name]>
`);

const div = el.shadowRoot.querySelector('div');
expect(div.className).to.equal('testClass');
});

it('auro-[name] is accessible', async () => {
it('[namespace]-[name] is accessible', async () => {
const el = await fixture(html`
<auro-[name] cssclass="testClass"></auro-[name]>
<[namespace]-[name] cssclass="testClass"></[namespace]-[name]>
`);

await expect(el).to.be.accessible();
});

it('auro-[name] custom element is defined', async () => {
const el = await !!customElements.get("auro-[name]");
it('[namespace]-[name] custom element is defined', async () => {
const el = await !!customElements.get("[namespace]-[name]");

await expect(el).to.be.true;
});
Expand Down

0 comments on commit 08788a8

Please sign in to comment.