Skip to content

Commit

Permalink
fix: specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendell committed Mar 12, 2019
1 parent 6adfb81 commit 54432b1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/input-number/nz-input-number.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ export class NzTestInputNumberBasicComponent {
placeholder = 'placeholder';
step = 1;
precision?: number = 2;
formatter = (value: number) => `${value}`;
formatter = (value: number) => value !== null ? `${value}` : '';
parser = (value: number) => value;
modelChange = jasmine.createSpy('change callback');
}
Expand Down
2 changes: 1 addition & 1 deletion components/modal/nz-modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export class NzModalComponent<T = any, R = any> extends NzModalRef<T, R> impleme
}

return Promise
.resolve(() => animation ? this.animateTo(visible) : undefined)
.resolve(animation ? this.animateTo(visible) : undefined)
.then(() => { // Emit open/close event after animations over
if (visible) {
this.nzAfterOpen.emit();
Expand Down
2 changes: 2 additions & 0 deletions components/modal/nz-modal.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ describe('modal testing (legacy)', () => {
});

it('should correctly render all basic props', fakeAsync(() => {
spyOn(console, 'log');

// [Hack] Codes that can't be covered by normal operations
// @ts-ignore
expect(modalInstance.changeVisibleFromInside(true) instanceof Promise).toBe(true);
Expand Down
2 changes: 1 addition & 1 deletion components/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ getTestBed().initTestEnvironment(
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
const context = require.context('./', true, /nz-input-number\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

0 comments on commit 54432b1

Please sign in to comment.