本文整理匯總了TypeScript中@heroku/buildpack-registry.Fixture類的典型用法代碼示例。如果您正苦於以下問題:TypeScript Fixture類的具體用法?TypeScript Fixture怎麽用?TypeScript Fixture使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Fixture類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
.nock('https://buildpack-registry.heroku.com', (api: Scope) => {
api
.get('/buildpacks/heroku%2Fruby')
.reply(200, Fixture.buildpack({
name: 'ruby',
source: {
type: 'github',
owner: 'heroku',
repo: 'heroku-buildpack-ruby',
},
}))
.get('/buildpacks/heroku%2Fruby/revisions')
.reply(200, [Fixture.revision()])
.get('/buildpacks/heroku%2Fruby/readme')
.reply(200, Fixture.readme())
})
示例2:
.nock('https://buildpack-registry.heroku.com', (api: Scope) => {
let buildpack = Fixture.buildpack({
name: 'ruby'
})
api
.get('/buildpacks/heroku%2Fruby')
.reply(200, buildpack)
})
示例3:
.nock('https://buildpack-registry.heroku.com', (api: Scope) => {
api
.get('/buildpacks/heroku%2Fruby/revisions')
.reply(200, [
Fixture.revision({
release: 138,
})
])
})
示例4:
.nock('https://buildpack-registry.heroku.com', (api: Scope) => {
api
.get('/buildpacks?in[namespace][]=heroku')
.reply(200, [
Fixture.buildpack({
name: 'ruby',
description: 'Official Heroku Buildpack for Ruby',
})
])
})
示例5:
.nock('https://buildpack-registry.heroku.com', (api: Scope) => {
let buildpack = Fixture.buildpack({
namespace: 'heroku',
name: 'ruby',
blob_url: 'https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/ruby.tgz',
})
api
.get('/buildpacks/heroku%2Fruby')
.reply(200, buildpack)
})