Use Angular CLI instead of ngm for building
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.
This commit is contained in:
committed by
Evgeny Arshinov
parent
6cb3f87e57
commit
7a342268bb
21
test/matchers.ts
Normal file
21
test/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