Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions test/tests/graphiql.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - GraphiQL', () => {
const { axios, GET } = cds.test(path.join(__dirname, '../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

test('GET request to endpoint should serve HTML containing GraphiQL', async () => {
const response = await GET('/graphql')
Expand Down
2 changes: 1 addition & 1 deletion test/tests/http.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('GraphQL express json parser error scenario', () => {
})
} catch (err) {
expect(err.status).toBe(400)
expect(err.response.data.error.message).toMatch(/not valid JSON/)
expect(err.response.data.error.message).toMatch(/JSON/i)
expect(_format(_error[0])).toContain('InvalidJSON')
}
})
Expand Down
4 changes: 1 addition & 3 deletions test/tests/localized.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - queries with localized data', () => {
const { axios, POST, data } = cds.test(path.join(__dirname, '../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

beforeEach(async () => {
await data.reset()
Expand Down
4 changes: 1 addition & 3 deletions test/tests/mutations/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - create mutations', () => {
const { axios, POST, data } = cds.test(path.join(__dirname, '../../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

beforeEach(async () => {
await data.reset()
Expand Down
4 changes: 1 addition & 3 deletions test/tests/mutations/delete.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - delete mutations', () => {
const { axios, POST, data } = cds.test(path.join(__dirname, '../../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

beforeEach(async () => {
await data.reset()
Expand Down
4 changes: 1 addition & 3 deletions test/tests/mutations/update.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - update mutations', () => {
const { axios, POST, data } = cds.test(path.join(__dirname, '../../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

beforeEach(async () => {
await data.reset()
Expand Down
4 changes: 1 addition & 3 deletions test/tests/queries/aliases.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - aliases', () => {
const { axios, POST } = cds.test(path.join(__dirname, '../../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

// REVISIT: unskip for support of configurable schema flavors
describe.skip('queries with aliases without connections', () => {
Expand Down
4 changes: 1 addition & 3 deletions test/tests/queries/filter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - filter', () => {
const { axios, POST, data } = cds.test(path.join(__dirname, '../../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

beforeEach(async () => {
await data.reset()
Expand Down
4 changes: 1 addition & 3 deletions test/tests/queries/fragments.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - fragments', () => {
const { axios, POST } = cds.test(path.join(__dirname, '../../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

// REVISIT: unskip for support of configurable schema flavors
describe.skip('queries with fragments without connections', () => {
Expand Down
4 changes: 1 addition & 3 deletions test/tests/queries/meta.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - meta fields', () => {
const { axios, POST } = cds.test(path.join(__dirname, '../../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

// REVISIT: unskip for support of configurable schema flavors
describe.skip('queries with __typename meta field without connections', () => {
Expand Down
4 changes: 1 addition & 3 deletions test/tests/queries/orderBy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - orderBy', () => {
const { axios, POST } = cds.test(path.join(__dirname, '../../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

// REVISIT: unskip for support of configurable schema flavors
describe.skip('queries with orderBy argument without connections', () => {
Expand Down
4 changes: 1 addition & 3 deletions test/tests/queries/paging-offset.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - offset-based paging', () => {
const { axios, POST } = cds.test(path.join(__dirname, '../../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

// REVISIT: unskip for support of configurable schema flavors
describe.skip('queries with paging arguments without connections', () => {
Expand Down
4 changes: 1 addition & 3 deletions test/tests/queries/queries.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - queries', () => {
const { axios, POST, data } = cds.test(path.join(__dirname, '../../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

beforeEach(async () => {
await data.reset()
Expand Down
4 changes: 1 addition & 3 deletions test/tests/queries/totalCount.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - queries with totalCount', () => {
const { axios, POST } = cds.test(path.join(__dirname, '../../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

test('simple query with totalCount', async () => {
const query = gql`
Expand Down
4 changes: 1 addition & 3 deletions test/tests/queries/variables.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ describe('graphql - variables', () => {
const { axios, POST } = cds.test(path.join(__dirname, '../../resources/bookshop-graphql'))
// Prevent axios from throwing errors for non 2xx status codes
axios.defaults.validateStatus = false
axios.defaults.headers = {
authorization: 'Basic YWxpY2U6'
}
axios.defaults.headers.Authorization = 'Basic YWxpY2U6'

// REVISIT: unskip for support of configurable schema flavors
describe.skip('queries with variables without connections', () => {
Expand Down
Loading