Skip to content

Commit

Permalink
test(validation): added more assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayan751 committed Jan 18, 2024
1 parent 43f1bc7 commit ae6a644
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1509,6 +1509,18 @@ describe('validation-html/validate-binding-behavior.spec.ts', function () {
results = result.results.filter(x => !x.valid);
assert.strictEqual(results.length, 0, 'results.length4');

assert.strictEqual((await controller.validate()).valid, true, 'await controller.validate()');

component.person.name = (void 0)!;
component.person.age = (void 0)!;
result = await controller.validate();
assert.strictEqual(result.valid, false, 'result.valid5');
assert.deepStrictEqual(
result.results.map(x => [x.propertyName, x.valid]),
[['name', false], ['age', false]],
'result.results.every(x => !x.valid)'
);

await stop(true);
});
});
Expand Down

0 comments on commit ae6a644

Please sign in to comment.