当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript pluck.pluck函数代码示例

本文整理汇总了TypeScript中ramda/src/pluck.pluck函数的典型用法代码示例。如果您正苦于以下问题:TypeScript pluck函数的具体用法?TypeScript pluck怎么用?TypeScript pluck使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了pluck函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

    it('GET will return all available tribes.', async function () {
        const tribes = [
            {id: 'Uno', name: 'one'},
            {id: 'Dos', name: 'two'},
            {id: 'Tres', name: 'three'}
        ];

        await tribesCollection.insert(tribes);
        let authorizedTribes = pluck('id', tribes);
        await authorizeUserForTribes(authorizedTribes);
        const response = await host.get(path)
            .expect(200)
            .expect('Content-Type', /json/);

        expect(pluck('id', response.body))
            .toEqual(pluck('id', tribes));
        expect(pluck('names', response.body))
            .toEqual(pluck('names', tribes));
    });
开发者ID:robertfmurdock,项目名称:Coupling,代码行数:19,代码来源:tribes-spec.ts

示例2: pluck

 .then(function (tribeDocuments) {
     const authorizedTribes = pluck('id', tribeDocuments);
     return e2eHelp.authorizeUserForTribes(authorizedTribes);
 });
开发者ID:robertfmurdock,项目名称:Coupling,代码行数:4,代码来源:edit-tribe.e2e.ts

示例3: it

 it('should have a section for each tribe', function () {
     const tribeElements = tribeListPage.getTribeElements();
     expect(tribeElements.getText()).toEqual(pluck('name', tribeDocuments));
 });
开发者ID:robertfmurdock,项目名称:Coupling,代码行数:4,代码来源:tribes.e2e.ts

示例4: pipe

 .then(function (documents) {
     return pipe(
         pluck('tribe'),
         union(user.tribes)
     )(documents);
 });
开发者ID:robertfmurdock,项目名称:Coupling,代码行数:6,代码来源:AuthorizedTribesFetcher.ts

示例5: it

 it('will show all the players ', function () {
     const playerElements = element.all(By.repeater('selectable in prepare.selectablePlayers'));
     expect(playerElements.getText()).toEqual(pluck('name', players));
 });
开发者ID:robertfmurdock,项目名称:Coupling,代码行数:4,代码来源:prepare-to-spin.e2e.ts

示例6: it

 it('will show all players', function () {
     browser.setLocation(`/${tribe.id}/player/new`);
     const playerElements = element.all(By.repeater('player in players'));
     expect(playerElements.getText()).toEqual(pluck('name', players));
 });
开发者ID:robertfmurdock,项目名称:Coupling,代码行数:5,代码来源:edit-player.e2e.ts


注:本文中的ramda/src/pluck.pluck函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。