Skip to content

Commit

Permalink
remove test for previews in openapi schema (github#23181)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachmari authored Nov 30, 2021
1 parent 23ca545 commit 63ab566
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/unit/openapi-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ describe('x-codeSamples for curl', () => {
expect(source).toEqual(expected)
})

test('operations with required preview headers', () => {
test('operations with required preview headers match Shell examples', () => {
const operationsWithRequiredPreviewHeaders = nonEnterpriseDefaultVersionSchema.filter(
(operation) => {
const previews = get(operation, 'x-github.previews', [])
return previews.some((preview) => preview.required)
}
)
expect(operationsWithRequiredPreviewHeaders.length).toBeGreaterThan(0)

const operationsWithHeadersInCodeSample = operationsWithRequiredPreviewHeaders.filter(
(operation) => {
const { source: codeSample } = operation['x-codeSamples'].find(
Expand Down Expand Up @@ -126,14 +126,13 @@ describe('x-codeSamples for @octokit/core.js', () => {
expect(source).toEqual(expected)
})

test('operations with required preview headers', () => {
test('operations with required preview headers match JavaScript examples', () => {
const operationsWithRequiredPreviewHeaders = nonEnterpriseDefaultVersionSchema.filter(
(operation) => {
const previews = get(operation, 'x-github.previews', [])
return previews.some((preview) => preview.required)
}
)
expect(operationsWithRequiredPreviewHeaders.length).toBeGreaterThan(0)

// Find something that looks like the following in each code sample:
/*
Expand Down

0 comments on commit 63ab566

Please sign in to comment.