Skip to content
Permalink
Browse files

test: mediaType request option

  • Loading branch information...
gr2m committed Mar 14, 2019
1 parent 47ac6f5 commit 21e7a017366a3b029413d5ad51f34741bb0b59b8
Showing with 30 additions and 1 deletion.
  1. +30 −1 test/integration/smoke-test.js
@@ -50,14 +50,43 @@ describe('smoke', () => {
const octokit = new Octokit({
baseUrl: 'https://smoke-test.com',
previews: [
// test with & without -preview suffix
'jean-grey-preview',
'symmetra-preview'
'symmetra'
]
})

return octokit.request('/')
})

it('mediaType request option', () => {
nock('https://smoke-test.com', {
reqheaders: {
'accept': 'application/vnd.github.foo-preview.raw,application/vnd.github.bar-preview.raw,application/vnd.github.baz-preview.raw'
}
})
.get('/')
.reply(200, {})

const octokit = new Octokit({
baseUrl: 'https://smoke-test.com',
previews: [
'foo',
'bar-preview'
]
})

return octokit.request('/', {
mediaType: {
previews: [
'bar',
'baz-preview'
],
format: 'raw'
}
})
})

it('request option', () => {
const octokit = new Octokit({
request: {

0 comments on commit 21e7a01

Please sign in to comment.
You can’t perform that action at this time.