(isNot: boolean)
| 100 | return {compare: buildError(false), negativeCompare: buildError(true)}; |
| 101 | |
| 102 | function buildError(isNot: boolean) { |
| 103 | return function (actual: any, className: string) { |
| 104 | return { |
| 105 | pass: hasClass(actual, className) == !isNot, |
| 106 | get message() { |
| 107 | return `Expected ${actual.outerHTML} ${ |
| 108 | isNot ? 'not ' : '' |
| 109 | }to contain the CSS class "${className}"`; |
| 110 | }, |
| 111 | }; |
| 112 | }; |
| 113 | } |
| 114 | }, |
| 115 | |
| 116 | toHaveCssStyle: function () { |