Some commands: npm run build - to build the library. Output is in dist/ng2-file-upload/. npm run test - to run tests. Coverage report is in coverage/ as before. npm run demo.serve - to build demo application and serve it through browsersync npm run start - to run demo application using `ng serve`. Requires the library to be built and linked first.
22 lines
601 B
TypeScript
22 lines
601 B
TypeScript
// 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}"`
|
|
};
|
|
};
|
|
}
|
|
}
|
|
});
|
|
});
|