• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript tester.testImmutableClass函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: it

  it('is an immutable class', () => {
    testImmutableClass<FilterClauseJS>(FilterClause, [
      {
        expression: { op: 'ref', name: 'language' },
        selection: {
          op: 'literal',
          value: {
            "setType": "STRING",
            "elements": ["en"]
          },
          "type": "SET"
        }
      },
      {
        expression: { op: 'ref', name: 'language' },
        selection: {
          op: 'literal',
          value: {
            "setType": "STRING",
            "elements": ["en", null]
          },
          "type": "SET"
        }
      },
      {
        expression: { op: 'ref', name: 'language' },
        selection: {
          op: 'literal',
          value: {
            "setType": "STRING",
            "elements": ["en"]
          },
          "type": "SET"
        },
        exclude: true
      },
      {
        expression: { op: 'ref', name: 'time' },
        selection: {
          op: 'literal',
          value: {
            "setType": "TIME_RANGE",
            "elements": [{ start: new Date('2015-11-11'), end: new Date('2015-11-12') }]
          },
          "type": "SET"
        },
        exclude: true
      },

      // Dynamic!
      {
        expression: { op: 'ref', name: 'language' },
        selection: {
          op: 'chain',
          expression: { op: 'ref', name: 'n' },
          action: { action: 'timeRange', duration: 'P1D', step: -1 }
        }
      },
      {
        expression: { op: 'ref', name: 'language' },
        selection: {
          op: 'chain',
          expression: { op: 'ref', name: 'm' },
          actions: [
            { action: 'timeShift', duration: 'P5D', step: -1 },
            { action: 'timeRange', duration: 'P1D', step: -1 }
          ]
        }
      }
    ]);
  });
开发者ID:fortressll87,项目名称:implydata-pivot,代码行数:71,代码来源:filter-clause.mocha.ts


示例2: it

 it('is an immutable class', () => {
   testImmutableClass(LinkItem, [
     LinkItemMock.testOneJS(),
     LinkItemMock.testTwoJS()
   ], { context });
 });
开发者ID:djfwan,项目名称:pivot,代码行数:6,代码来源:link-item.mocha.ts


示例3: it

 it('is an immutable class', () => {
   testImmutableClass(LinkViewConfig, [
     LinkViewConfigMock.testOneOnlyJS(),
     LinkViewConfigMock.testOneTwoJS()
   ], { context });
 });
开发者ID:RaviNK,项目名称:pivot,代码行数:6,代码来源:link-view-config.mocha.ts


示例4: it

  it('is an immutable class', () => {
    testImmutableClass<DataSourceJS>(DataSource, [
      {
        name: 'twitter',
        title: 'Twitter',
        engine: 'druid',
        source: 'twitter',
        subsetFilter: null,
        introspection: 'none',
        dimensions: [
          {
            expression: {
              name: 'time',
              op: 'ref'
            },
            kind: 'time',
            name: 'time',
            title: 'Time'
          },
          {
            expression: {
              name: 'twitterHandle',
              op: 'ref'
            },
            kind: 'string',
            name: 'twitterHandle',
            title: 'Twitter Handle'
          }
        ],
        measures: [
          {
            name: 'count',
            title: 'count',
            expression: {
              name: 'count',
              op: 'ref'
            }

          }
        ],
        timeAttribute: 'time',
        defaultTimezone: 'Etc/UTC',
        defaultFilter: { op: 'literal', value: true },
        defaultDuration: 'P3D',
        defaultSortMeasure: 'count',
        defaultPinnedDimensions: ['tweet'],
        refreshRule: {
          refresh: "PT1M",
          rule: "fixed"
        }
      },
      {
        name: 'wiki',
        title: 'Wiki',
        engine: 'druid',
        source: 'wiki',
        subsetFilter: null,
        introspection: 'none',
        attributes: [
          { name: 'time', type: 'TIME' },
          { name: 'articleName', type: 'STRING' },
          { name: 'count', type: 'NUMBER', unsplitable: true, makerAction: { action: 'count' } }
        ],
        dimensions: [
          {
            expression: {
              name: 'time',
              op: 'ref'
            },
            kind: 'time',
            name: 'time',
            title: 'Time'
          },
          {
            expression: {
              name: 'articleName',
              op: 'ref'
            },
            kind: 'string',
            name: 'articleName',
            title: 'Article Name'
          }
        ],
        measures: [
          {
            name: 'count',
            title: 'count',
            expression: $('main').sum('$count').toJS()
          }
        ],
        timeAttribute: 'time',
        defaultTimezone: 'Etc/UTC',
        defaultFilter: { op: 'literal', value: true },
        defaultDuration: 'P3D',
        defaultSortMeasure: 'count',
        defaultPinnedDimensions: ['articleName'],
        refreshRule: {
          refresh: "PT1M",
          rule: "fixed"
        }
//.........这里部分代码省略.........
开发者ID:coconutpalm,项目名称:pivot,代码行数:101,代码来源:data-source.mocha.ts


示例5: it

  it('is an immutable class', () => {
    testImmutableClass<FilterJS>(Filter, [
      { op: 'literal', value: true },
      {
        "op": "chain", "expression": { "op": "ref", "name": "language" },
        "action": {
          "action": "overlap",
          "expression": {
            "op": "literal",
            "value": { "setType": "STRING", "elements": ["en"] },
            "type": "SET"
          }
        }
      },
      {
        "op": "chain", "expression": { "op": "ref", "name": "time" },
        "action": {
          "action": "in",
          "expression": {
            "op": "literal",
            "value": { "start": new Date("2013-02-26T19:00:00.000Z"), "end": new Date("2013-02-26T22:00:00.000Z") },
            "type": "TIME_RANGE"
          }
        }
      },
      {
        "op": "chain", "expression": { "op": "ref", "name": "language" },
        "action": {
          "action": "overlap",
          "expression": {
            "op": "literal",
            "value": { "setType": "STRING", "elements": ["he"] },
            "type": "SET"
          }
        }
      },
      {
        "op": "chain",
        "expression": { "op": "ref", "name": "language" },
        "actions": [
          {
            "action": "overlap",
            "expression": {
              "op": "literal",
              "value": { "setType": "STRING", "elements": ["he"] },
              "type": "SET"
            }
          },
          {
            "action": "and",
            "expression": {
              "op": "chain", "expression": { "op": "ref", "name": "namespace" },
              "action": {
                "action": "overlap",
                "expression": {
                  "op": "literal",
                  "value": { "setType": "STRING", "elements": ["wikipedia"] },
                  "type": "SET"
                }
              }
            }
          }
        ]
      },

      // Dynamic
      {
        "op": "chain", "expression": { "op": "ref", "name": "time" },
        "action": {
          "action": "in",
          "expression": {
            op: 'chain',
            expression: { op: 'ref', name: 'n' },
            action: { action: 'timeRange', duration: 'P1D', step: -1 }
          }
        }
      }
    ]);
  });
开发者ID:RaviNK,项目名称:pivot,代码行数:79,代码来源:filter.mocha.ts


示例6: it

 it('is an immutable class', () => {
   testImmutableClass<DataSourceJS>(DataSource, [
     DataSourceMock.TWITTER_JS,
     DataSourceMock.WIKI_JS
   ]);
 });
开发者ID:saeedsh,项目名称:pivot,代码行数:6,代码来源:data-source.mocha.ts


示例7: it

 it('is an immutable class', () => {
   testImmutableClass(AppSettings, [
     AppSettingsMock.wikiOnlyJS(),
     AppSettingsMock.wikiTwitterJS()
   ]);
 });
开发者ID:boneill42,项目名称:pivot,代码行数:6,代码来源:app-settings.mocha.ts



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript cursor.from函数代码示例发布时间:2022-05-25
下一篇:
TypeScript immutable-class.isInstanceOf函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap