Skip to content

Commit fd28a42

Browse files
authored
test: update custom-field validation tests to also use Lit (#7920)
1 parent a106509 commit fd28a42

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import '../src/vaadin-lit-custom-field.js';
2+
import './validation.common.js';
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import '../src/vaadin-custom-field.js';
2+
import './validation.common.js';

packages/custom-field/test/validation.test.js renamed to packages/custom-field/test/validation.common.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { expect } from '@vaadin/chai-plugins';
2-
import { fire, fixtureSync, nextRender } from '@vaadin/testing-helpers';
2+
import { fire, fixtureSync, nextRender, nextUpdate } from '@vaadin/testing-helpers';
33
import sinon from 'sinon';
4-
import '../src/vaadin-custom-field.js';
54

65
describe('validation', () => {
76
let customField;
@@ -37,8 +36,9 @@ describe('validation', () => {
3736
expect(validateSpy.calledOnce).to.be.true;
3837
});
3938

40-
it('should validate on value change', () => {
39+
it('should validate on value change', async () => {
4140
customField.value = 'foo,1';
41+
await nextUpdate(customField);
4242
expect(validateSpy.calledOnce).to.be.true;
4343
});
4444

0 commit comments

Comments
 (0)