本文整理汇总了TypeScript中vs/workbench/services/files/test/electron-browser/utils.getByName函数的典型用法代码示例。如果您正苦于以下问题:TypeScript getByName函数的具体用法?TypeScript getByName怎么用?TypeScript getByName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getByName函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1:
return resolver.resolve({ resolveTo: [toResource('other/deep')] }).then(result => {
assert.ok(result);
assert.ok(result.children);
assert.ok(result.children.length > 0);
assert.ok(result.isDirectory);
let children = result.children;
assert.equal(children.length, 4);
let other = utils.getByName(result, 'other');
assert.ok(other);
assert.ok(other.children.length > 0);
let deep = utils.getByName(other, 'deep');
assert.ok(deep);
assert.ok(deep.children.length > 0);
assert.equal(deep.children.length, 4);
});
开发者ID:burhandodhy,项目名称:azuredatastudio,代码行数:18,代码来源:resolver.test.ts
示例2:
]).then(res => {
const r1 = res[0].stat;
assert.equal(r1.children.length, 8);
const deep = utils.getByName(r1, 'deep');
assert.equal(deep.children.length, 4);
const r2 = res[1].stat;
assert.equal(r2.children.length, 4);
assert.equal(r2.name, 'deep');
});
开发者ID:liunian,项目名称:vscode,代码行数:12,代码来源:fileService.test.ts
示例3: toResource
return resolver.resolve({ resolveTo: [toResource('other/deep'), toResource('examples')] }).then(result => {
assert.ok(result);
assert.ok(result.children);
assert.ok(result.children!.length > 0);
assert.ok(result.isDirectory);
const children = result.children!;
assert.equal(children.length, 4);
const other = utils.getByName(result, 'other');
assert.ok(other);
assert.ok(other!.children!.length > 0);
const deep = utils.getByName(other!, 'deep');
assert.ok(deep);
assert.ok(deep!.children!.length > 0);
assert.equal(deep!.children!.length, 4);
const examples = utils.getByName(result, 'examples');
assert.ok(examples);
assert.ok(examples!.children!.length > 0);
assert.equal(examples!.children!.length, 4);
});
开发者ID:joelday,项目名称:vscode,代码行数:23,代码来源:resolver.test.ts
注:本文中的vs/workbench/services/files/test/electron-browser/utils.getByName函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论