当前位置: 首页>>代码示例>>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;未经允许,请勿转载。