light-dom-element-test
Advanced tools
Comparing version 0.0.2 to 0.0.3
import { LitElement } from 'lit'; | ||
export declare class LightDomElementTest extends LitElement { | ||
static styles: import("lit").CSSResult; | ||
static styles: import('lit').CSSResult; | ||
title: string; | ||
counter: number; | ||
__increment(): void; | ||
render(): import("lit-html").TemplateResult<1>; | ||
render(): import('lit-html').TemplateResult<1>; | ||
} |
import { TemplateResult } from 'lit'; | ||
import '../src/light-dom-element-test.js'; | ||
declare const _default: { | ||
@@ -4,0 +5,0 @@ title: string; |
@@ -6,3 +6,3 @@ { | ||
"author": "light-dom-element-test", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"main": "dist/src/index.js", | ||
@@ -28,3 +28,3 @@ "module": "dist/src/index.js", | ||
"lit": "^2.0.0-rc.2", | ||
"shadow-dom-element": "0.0.2" | ||
"shadow-dom-element": "0.0.3" | ||
}, | ||
@@ -31,0 +31,0 @@ "devDependencies": { |
@@ -88,8 +88,8 @@ # \<shadows-dom-element> & \<light-dom-element> test | ||
[light-url]: https://github.com/sashafirsov/light-dom-element | ||
[shadow-demo]: https://unpkg.com/light-dom-element-test@0.0.2/demo/shadow-dom/index.html | ||
[light-demo]: https://unpkg.com/light-dom-element-test@0.0.2/demo/light-dom/index.html | ||
[shadow-demo]: https://unpkg.com/light-dom-element-test@0.0.3/demo/shadow-dom/index.html | ||
[light-demo]: https://unpkg.com/light-dom-element-test@0.0.3/demo/light-dom/index.html | ||
[npm-image]: https://img.shields.io/npm/v/light-dom-element-test.svg | ||
[npm-url]: https://npmjs.org/package/light-dom-element-test | ||
[coverage-image]: https://unpkg.com/light-dom-element-test@0.0.2/coverage/coverage.svg | ||
[coverage-url]: https://unpkg.com/light-dom-element-test@0.0.2/coverage/lcov-report/index.html | ||
[coverage-image]: https://unpkg.com/light-dom-element-test@0.0.3/coverage/coverage.svg | ||
[coverage-url]: https://unpkg.com/light-dom-element-test@0.0.3/coverage/lcov-report/index.html |
@@ -6,2 +6,5 @@ import { html } from 'lit'; | ||
const slotsUrl = new URL('./slots.html', import.meta.url).href; | ||
const templateUrl = new URL('./template.html', import.meta.url).href; | ||
describe('ShadowDomElement test', () => { | ||
@@ -91,2 +94,16 @@ it('passed title attribute', async () => { | ||
}); | ||
it('src & code attributes', async () => { | ||
const el = await fixture( | ||
html`<shadow-dom-element src="${slotsUrl}" code="${templateUrl}"></shadow-dom-element>` | ||
); | ||
await el.promise; | ||
// template slots are replaced | ||
expect($('h5', el).txt()).to.equal(''); | ||
expect($('button', el).length).to.equal(0); | ||
// by slots | ||
expect($('a', el).txt()).to.equal('link 😃'); | ||
expect($('h3', el).id).to.equal('heading'); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
290557
93
2465
+ Addedshadow-dom-element@0.0.3(transitive)
- Removedshadow-dom-element@0.0.2(transitive)
Updatedshadow-dom-element@0.0.3