From af185c216cf29fae5c68765e8b6f4bc08ebf33d7 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 3 Oct 2018 23:32:18 +0200 Subject: [PATCH] docs(matchers): fix recent matcher descriptions Fix description for `toHaveAttribute` matcher. Add description for `toHaveProperty` matcher. --- src/lib/src/matchers.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/src/matchers.ts b/src/lib/src/matchers.ts index c25e32b2..bd632b82 100644 --- a/src/lib/src/matchers.ts +++ b/src/lib/src/matchers.ts @@ -118,7 +118,7 @@ export const toHaveAttr = comparator((el, { attr, val }) => { }); /** - * expect(host.query('.zippy')).toHaveAttr({ attr: 'id', val: 'zippy' }); + * expect(host.query('.zippy')).toHaveAttribute('id', 'zippy'); */ export const toHaveAttribute = comparator((el, attr, val) => { const actual = $(el).attr(attr); @@ -140,6 +140,9 @@ export const toHaveProp = comparator((el, { prop, val }) => { return { pass, message }; }); +/** + * expect(host.query('.checkbox')).toHaveProperty('checked', true); + */ export const toHaveProperty = comparator((el, prop, val) => { const actual = $(el).prop(prop); const addendum = val !== undefined ? ` with value '${val}'` : '';