mirror of
https://github.com/jlengrand/open-wc.git
synced 2026-03-10 08:31:19 +00:00
committed by
Benny Powers
parent
12d8f69589
commit
e952abdace
@@ -1,4 +1,4 @@
|
||||
# `Plugin: semantic-dom-diff`
|
||||
# `Plugin - semantic-dom-diff`
|
||||
|
||||
#### `can compare against a snapshot`
|
||||
|
||||
@@ -10,4 +10,3 @@
|
||||
</div>
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Exposes chai as an es module with useful plugins pre-configured:
|
||||
```javascript
|
||||
import { expect, fixture, html } from '@open-wc/testing';
|
||||
|
||||
describe('Plugin: semantic-dom-diff', () => {
|
||||
describe('Plugin - semantic-dom-diff', () => {
|
||||
it('can semantically compare full dom trees', async () => {
|
||||
const el = await fixture(`<div><!-- comment --><h1>${'Hey'} </h1> </div>`);
|
||||
expect(el).dom.to.equal('<div><h1>Hey</h1></div>');
|
||||
@@ -71,7 +71,7 @@ describe('my-test', () => {
|
||||
```js
|
||||
import { fixture, expect } from '@open-wc/testing';
|
||||
|
||||
describe('Plugin: chai-dom', () => {
|
||||
describe('Plugin - chai-dom', () => {
|
||||
it('can check for an exiting css class', async () => {
|
||||
const el = await fixture(`<div class="foo bar"></div>`);
|
||||
expect(el).to.have.class('foo');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fixture, expect } from '../index.js';
|
||||
|
||||
describe('Plugin: chai-dom', () => {
|
||||
describe('Plugin - chai-dom', () => {
|
||||
it('can check for an exiting css class', async () => {
|
||||
const el = await fixture(`<div class="foo bar"></div>`);
|
||||
expect(el).to.have.class('foo');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import sinon from 'sinon';
|
||||
import { expect } from '../index.js';
|
||||
|
||||
describe('Plugin: sinon-chai', () => {
|
||||
describe('Plugin - sinon-chai', () => {
|
||||
it('can expect a spys callCount', async () => {
|
||||
const spy = sinon.spy();
|
||||
expect(spy).to.have.callCount(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fixture, expect } from '../index.js';
|
||||
|
||||
describe('Plugin: semantic-dom-diff', () => {
|
||||
describe('Plugin - semantic-dom-diff', () => {
|
||||
it('can semantically compare full dom trees', async () => {
|
||||
const el = await fixture(`<div><!-- comment --><h1>${'Hey'} </h1> </div>`);
|
||||
expect(el).dom.to.equal('<div><h1>Hey</h1></div>');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import sinon from 'sinon';
|
||||
import { expect } from '../index.js';
|
||||
|
||||
describe('Plugin: sinon-chai', () => {
|
||||
describe('Plugin - sinon-chai', () => {
|
||||
it('can expect a spys callCount', async () => {
|
||||
const spy = sinon.spy();
|
||||
expect(spy).to.have.callCount(0);
|
||||
|
||||
Reference in New Issue
Block a user