fixing various babel issues within tests
This commit is contained in:
parent
31c5e4c59b
commit
1487a6012f
|
@ -30,9 +30,9 @@ exports.save = async function (ctx) {
|
|||
datasource._rev = response.rev
|
||||
|
||||
// Drain connection pools when configuration is changed
|
||||
const pool = integrations[datasource.source].pool
|
||||
if (pool) {
|
||||
await pool.end()
|
||||
const source = integrations[datasource.source]
|
||||
if (source && source.pool) {
|
||||
await source.pool.end()
|
||||
}
|
||||
|
||||
ctx.status = 200
|
||||
|
|
|
@ -5,7 +5,7 @@ jest.mock("../../environment", () => ({
|
|||
prod: false,
|
||||
isTest: () => true,
|
||||
isProd: () => this.prod,
|
||||
_set: (key, value) => {
|
||||
_set: function(key, value) {
|
||||
this.prod = value === "production"
|
||||
}
|
||||
})
|
||||
|
|
|
@ -91,7 +91,7 @@ describe("resourceId middleware", () => {
|
|||
.mainResource("custom")
|
||||
.subResource("customSub")
|
||||
.build()
|
||||
config = new TestConfiguration(middleware)
|
||||
let config = new TestConfiguration(middleware)
|
||||
config.setBody({
|
||||
custom: "test",
|
||||
customSub: "subtest"
|
||||
|
|
Loading…
Reference in New Issue