Skip to content

Commit

Permalink
test: update custom-field validation tests to also use Lit
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Oct 2, 2024
1 parent 02cc350 commit ba66524
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions packages/custom-field/test/validation-lit.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import '../src/vaadin-lit-custom-field.js';
import './validation.common.js';
2 changes: 2 additions & 0 deletions packages/custom-field/test/validation-polymer.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import '../src/vaadin-custom-field.js';
import './validation.common.js';
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { expect } from '@vaadin/chai-plugins';
import { fire, fixtureSync, nextRender } from '@vaadin/testing-helpers';
import { fire, fixtureSync, nextRender, nextUpdate } from '@vaadin/testing-helpers';
import sinon from 'sinon';
import '../src/vaadin-custom-field.js';

describe('validation', () => {
let customField;
Expand Down Expand Up @@ -37,8 +36,9 @@ describe('validation', () => {
expect(validateSpy.calledOnce).to.be.true;
});

it('should validate on value change', () => {
it('should validate on value change', async () => {
customField.value = 'foo,1';
await nextUpdate(customField);
expect(validateSpy.calledOnce).to.be.true;
});

Expand Down

0 comments on commit ba66524

Please sign in to comment.