Skip to content

Commit

Permalink
Merge pull request #43 from LayZeeDK/patch-1
Browse files Browse the repository at this point in the history
docs(matchers): fix recent matcher descriptions
  • Loading branch information
NetanelBasal authored Oct 3, 2018
2 parents 316baaa + af185c2 commit b90881d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/src/matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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}'` : '';
Expand Down

0 comments on commit b90881d

Please sign in to comment.