Skip to content

Commit

Permalink
chore(lit-helpers): make testing a dev dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsDenBakker committed Dec 1, 2019
1 parent 1079b0f commit 2e34762
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 1 addition & 3 deletions packages/lit-helpers/package.json
Expand Up @@ -31,10 +31,8 @@
"peerDependencies": {
"lit-html": "^1.0.0"
},
"dependencies": {
"@open-wc/testing": "^2.4.1"
},
"devDependencies": {
"@open-wc/testing": "^2.4.1",
"sinon": "^7.4.1"
},
"module": "index.js"
Expand Down
26 changes: 14 additions & 12 deletions packages/lit-helpers/test/live.test.js
Expand Up @@ -3,19 +3,21 @@ import { spy } from 'sinon';
import { render } from 'lit-html';
import { live } from '../src/live.js';

class MyElement extends HTMLElement {
set myProp(value) {
this._myProp = value;
}

get myProp() {
return this._myProp;
}
}
describe('live', () => {
before(() => {
class LitHelpers extends HTMLElement {
set myProp(value) {
this._myProp = value;
}

get myProp() {
return this._myProp;
}
}

customElements.define('my-element', MyElement);
customElements.define('lit-helpers', LitHelpers);
});

describe('live', () => {
describe('property bindings', () => {
let wrapper;
beforeEach(async () => {
Expand All @@ -25,7 +27,7 @@ describe('live', () => {
function renderLive(value) {
render(
html`
<my-element .myProp="${live(value)}"></my-element>
<lit-helpers .myProp="${live(value)}"></lit-helpers>
`,
wrapper,
);
Expand Down

0 comments on commit 2e34762

Please sign in to comment.