本文整理汇总了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/'`]);
});
示例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');
}
});
示例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`
);
}
示例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`
);
}
示例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`]);
});
示例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'
]);
}
示例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`
);
}
示例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'"
);
}