當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript moment-es6.default函數代碼示例

本文整理匯總了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();
 });
開發者ID:Alfresco,項目名稱:alfresco-ng2-components,代碼行數:10,代碼來源:document-list-component.e2e.ts

示例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());
        });
開發者ID:Alfresco,項目名稱:alfresco-ng2-components,代碼行數:12,代碼來源:node-lock.dialog.spec.ts

示例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());
            }
        );
    }));
開發者ID:Alfresco,項目名稱:alfresco-ng2-components,代碼行數:15,代碼來源:card-view-dateitem.component.spec.ts

示例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();
    });
開發者ID:Alfresco,項目名稱:alfresco-ng2-components,代碼行數:17,代碼來源:content-node-share.dialog.spec.ts

示例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();
        });
開發者ID:Alfresco,項目名稱:alfresco-ng2-components,代碼行數:19,代碼來源:node-lock.dialog.spec.ts


注:本文中的moment-es6.default函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。