本文整理匯總了TypeScript中moment-es6.default函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript default函數的具體用法?TypeScript default怎麽用?TypeScript default使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了default函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('[C279929] Should be able to display the date with date type', async (done) => {
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
mediumDateUploadedNode = await uploadActions.uploadFile(this.alfrescoJsApi, mediumFileModel.location, mediumFileModel.name, '-my-');
let createdDate = moment(mediumDateUploadedNode.createdAt).format('ll');
contentServicesPage.goToDocumentList();
contentServicesPage.enableMediumTimeFormat();
let dateValue = contentServicesPage.getColumnValueForRow(mediumFileModel.name, 'Created');
expect(dateValue).toContain(createdDate);
done();
});
示例2: it
it('should update form inputs', () => {
let newTime = moment();
component.form.controls['isLocked'].setValue(false);
component.form.controls['allowOwner'].setValue(false);
component.form.controls['isTimeLock'].setValue(false);
component.form.controls['time'].setValue(newTime);
expect(component.form.value.isLocked).toBe(false);
expect(component.form.value.allowOwner).toBe(false);
expect(component.form.value.isTimeLock).toBe(false);
expect(component.form.value.time.format()).toBe(newTime.format());
});
示例3: it
it('should update the property value after a successful update attempt', async(() => {
component.editable = true;
component.property.editable = true;
component.property.value = null;
const expectedDate = moment('Jul 10 2017', 'MMM DD YY');
fixture.detectChanges();
component.onDateChanged({ value: expectedDate });
fixture.whenStable().then(
(updateNotification) => {
expect(component.property.value).toEqual(expectedDate.toDate());
}
);
}));
示例4: it
it('should not update shared node expiryDate property when value changes', () => {
const date = moment();
node.entry.properties['qshare:sharedId'] = 'sharedId';
spyOn(nodesApiService, 'updateNode');
fixture.componentInstance.form.controls['time'].setValue(null);
component.data = {
node,
baseShareUrl: 'some-url/'
};
fixture.detectChanges();
fixture.componentInstance.form.controls['time'].setValue(date);
fixture.detectChanges();
expect(nodesApiService.updateNode).toHaveBeenCalled();
});
示例5: beforeEach
beforeEach(() => {
jasmine.clock().mockDate(new Date());
expiryDate = moment().add(1, 'minutes');
component.data = {
node: {
id: 'node-id',
name: 'node-name',
isLocked: true,
properties: {
['cm:lockType']: 'WRITE_LOCK',
['cm:expiryDate']: expiryDate
}
},
onError: () => {
}
};
fixture.detectChanges();
});