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


TypeScript assert.includeMembers方法代码示例

本文整理汇总了TypeScript中chai.assert.includeMembers方法的典型用法代码示例。如果您正苦于以下问题:TypeScript assert.includeMembers方法的具体用法?TypeScript assert.includeMembers怎么用?TypeScript assert.includeMembers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在chai.assert的用法示例。


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

示例1: async

      async () => {
        const wctCliRunStub =
            sandbox.stub(wct.cli, 'run').returns(Promise.resolve());
        const cli = new PolymerCli(['test', '--npm']);
        await cli.run();

        const wctArgs = wctCliRunStub.args[0][1];
        assert.includeMembers(wctCliRunStub.args[0][1], ['--npm']);
        assert.includeMembers(wctArgs, [`--component-dir='node_modules/'`]);
      });
开发者ID:MehdiRaash,项目名称:tools,代码行数:10,代码来源:test_test.ts

示例2:

								return helper.listDefPaths(info.typingsDir).then((typings:string[]) => {
									assert.includeMembers(typings, context.config.getInstalledPaths(), 'saved installed file');
									if (test.modify && test.modify.written) {
										var writenPaths = tsd.DefUtil.getPathsOf(xm.valuesOf(result.written));
										assert.sameMembers(writenPaths.sort(), test.modify.written.sort(), 'written: files');
									}
								});
开发者ID:AbraaoAlves,项目名称:tsd,代码行数:7,代码来源:API.ts

示例3: assertViewsExist

export async function assertViewsExist(db: SQLDatabase, viewNames: string[]) {
  let allViews = await db.getAllViews();
  assert.includeMembers(
    allViews.map(s => s.toLowerCase()),
    viewNames.map(s => s.toLowerCase()),
    `${viewNames.join(', ')} view(s) found`
  );
}
开发者ID:qjac,项目名称:sql-fundamentals,代码行数:8,代码来源:table.ts

示例4: assertTableExists

export async function assertTableExists(db: SQLDatabase, tableName: string) {
  let allTables = await db.getAllTableNames();
  assert.includeMembers(
    allTables.map(t => t.toLowerCase()),
    [tableName],
    `${tableName} table is found`
  );
}
开发者ID:qjac,项目名称:sql-fundamentals,代码行数:8,代码来源:table.ts

示例5: test

  test('--module-resolution flag is passed to WCT', async () => {
    const wctCliRunStub = sinon.stub(wct.cli, 'run').returns(Promise.resolve());
    const cli = new PolymerCli(['test', '--module-resolution=none']);
    await cli.run();

    const wctArgs = wctCliRunStub.args[0][1];
    assert.includeMembers(wctArgs, [`--module-resolution=none`]);
  });
开发者ID:Polymer,项目名称:tools,代码行数:8,代码来源:test_test.ts

示例6: productIndicesPresent

 @test('Function table_update_notify is found')
 public async productIndicesPresent() {
   let db = await getDb();
   let indexInfo = await db.getAllFunctions();
   assert.includeMembers(indexInfo.map(s => s.toLowerCase()), [
     'table_update_notify'
   ]);
 }
开发者ID:qjac,项目名称:sql-fundamentals,代码行数:8,代码来源:ex17.pubsub.migration.test.ts

示例7: assertTriggersExist

export async function assertTriggersExist(
  db: SQLDatabase,
  triggerNames: string[]
) {
  let allTriggers = await db.getAllTriggers();
  assert.includeMembers(
    allTriggers.map(s => s.toLowerCase()),
    triggerNames.map(s => s.toLowerCase()),
    `${triggerNames.join(', ')} trigger(s) found`
  );
}
开发者ID:qjac,项目名称:sql-fundamentals,代码行数:11,代码来源:table.ts

示例8: viewResults

 @test('Querying the view yields expected results')
 public async viewResults() {
   let db = await getDb();
   let result = await db.get(sql`SELECT * from SupplierList_V`);
   assert.ok(result, 'Results of query are truthy');
   assert.includeMembers(
     Object.keys(result),
     ['id', 'companyname', 'contactname', 'productlist'],
     "Columns: 'id', 'companyname', 'contactname', 'productlist'"
   );
 }
开发者ID:qjac,项目名称:sql-fundamentals,代码行数:11,代码来源:ex12.supplier-list-view.test.ts


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