本文整理汇总了TypeScript中when/pipeline.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: pipeline
"suggestions": function() {
return pipeline([
()=> lab.get_json('/vineyard/solr/character/suggest?q=jam'),
(response)=> {
console.log('response', response.objects)
assert.equals(response.objects.length, 1)
}
])
}
开发者ID:durandal79,项目名称:vineyard-test-suite,代码行数:9,代码来源:solr-test.ts
示例2: pipeline
"counts": function () {
var query = {
"trellis": "character",
"filters": [
{
"path": "name",
"value": "James"
}
]
}
var update1 = {
"objects": [
{
"trellis": "item",
"id": 25,
"owner": 1,
"name": "syringe"
}
]
}
var update2 = {
"objects": [
{
"trellis": "item",
"id": 25,
"_deleted_": true
}
]
}
return pipeline([
()=> Irrigation.query(query, fixture.users['cj'], ground, lab.vineyard),
(response) => {
var objects = response.objects
console.log('response', response)
assert.equals(objects[0].item_count, 2)
},
()=> Irrigation.update(update1, fixture.users['cj'], ground, lab.vineyard),
()=> Irrigation.query(query, fixture.users['cj'], ground, lab.vineyard),
(response) => {
var objects = response.objects
console.log('response', response)
assert.equals(objects[0].item_count, 3)
},
()=> Irrigation.update(update2, fixture.users['cj'], ground, lab.vineyard),
()=> Irrigation.query(query, fixture.users['cj'], ground, lab.vineyard),
(response) => {
var objects = response.objects
console.log('response', response)
assert.equals(objects[0].item_count, 2, 'Deleting item updated item count.')
}
])
},
开发者ID:durandal79,项目名称:vineyard-test-suite,代码行数:55,代码来源:update-test.ts
示例3: pipeline
"photo notifications": function () {
var socket
var update = {
objects: [
{
"trellis": "character",
"name": "deleteme"
}
]
}
return pipeline([
()=> lab.login_socket('cj', 'pass'),
(s) => socket = s,
()=> lab.emit(socket, 'room/join', 'event/7E6FB110-9B43-11E3-895F-CB7A0150F761'),
()=> {
assert(true)
return lab.emit(socket, 'update', update)
}
])
}
开发者ID:durandal79,项目名称:vineyard-test-suite,代码行数:21,代码来源:login-test.ts
注:本文中的when/pipeline.default函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论