Skip to content

Commit

Permalink
test: add check for _$isValidator$
Browse files Browse the repository at this point in the history
  • Loading branch information
hardikpthv committed Nov 7, 2024
1 parent 23fd0cc commit faf21c9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable dot-notation */
import { LitElement } from 'lit';
import { defineCE, expect, fixture, html, unsafeStatic } from '@open-wc/testing';
import sinon from 'sinon';
Expand Down Expand Up @@ -190,6 +191,8 @@ describe('Validator', () => {
describe('Types', () => {
it('has type "error" by default', async () => {
expect(new Validator().type).to.equal('error');
expect(new Validator()['_$isValidator$']).to.be.exist;
expect(new Validator()['_$isValidator$']).to.equal(true);
});

it('supports customized types', async () => {
Expand All @@ -204,6 +207,8 @@ describe('Validator', () => {
}
}
expect(new MyValidator().type).to.equal('my-type');
expect(new Validator()['_$isValidator$']).to.be.exist;
expect(new Validator()['_$isValidator$']).to.equal(true);
});
});
});

0 comments on commit faf21c9

Please sign in to comment.