Some checks failed
/ build (map[dockerfile:./services/tasks/Dockerfile name:tasks]) (push) Failing after 1m25s
/ deploy (push) Has been skipped
/ build (map[dockerfile:./services/files/Dockerfile name:files]) (push) Failing after 1m34s
/ build (map[dockerfile:./services/app/Dockerfile name:app]) (push) Successful in 2m9s
/ build (map[dockerfile:./services/api/Dockerfile name:api]) (push) Failing after 1m42s
/ build (map[dockerfile:./services/web/Dockerfile name:web]) (push) Failing after 1m18s
/ build (map[dockerfile:./services/watchers/Dockerfile name:watchers]) (push) Failing after 1m22s
/ build (map[dockerfile:./services/hasura/Dockerfile name:hasura]) (push) Successful in 2m3s
19 lines
542 B
JavaScript
19 lines
542 B
JavaScript
require("jest-specific-snapshot")
|
|
|
|
const yaml = require("js-yaml")
|
|
const axios = require("axios")
|
|
const defaultsDeep = require("lodash.defaultsdeep")
|
|
|
|
const defaultAxiosParams = { headers: { "Access-Control-Allow-Origin": "*" } }
|
|
module.exports = async ({ name, ...axiosParams }) => {
|
|
let response
|
|
try {
|
|
response = await axios(defaultsDeep(axiosParams, defaultAxiosParams))
|
|
} catch (err) {
|
|
console.error(err)
|
|
throw err
|
|
}
|
|
expect(yaml.dump(response.data)).toMatchSpecificSnapshot(
|
|
`./__snapshots__/${name}.yaml`
|
|
)
|
|
}
|