feat(package): upgrade to ng v2.3+ (#574)
This commit was merged in pull request #574.
This commit is contained in:
committed by
GitHub
parent
f5b5dc3bd2
commit
3cc6a9946f
21
scripts/matchers.ts
Normal file
21
scripts/matchers.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
// tslint:disable
|
||||
/**
|
||||
* @copyright Angular ng-bootstrap team
|
||||
*/
|
||||
beforeEach(() => {
|
||||
jasmine.addMatchers({
|
||||
toHaveCssClass(/*util, customEqualityTests*/) {
|
||||
return {compare: buildError(false), negativeCompare: buildError(true)};
|
||||
|
||||
function buildError(isNot) {
|
||||
return function (actual, className) {
|
||||
const orNot = isNot ? 'not ' : '';
|
||||
return {
|
||||
pass: actual.classList.contains(className) === !isNot,
|
||||
message: `Expected ${actual.outerHTML} ${orNot} to contain the CSS class "${className}"`
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user