mirror of https://github.com/Budibase/budibase.git
13 changed files with 89 additions and 135 deletions
@ -1,5 +1,32 @@ |
|||
const TEST_CLIENT_ID = "test-client-id" |
|||
|
|||
exports.TEST_CLIENT_ID = TEST_CLIENT_ID |
|||
const TestConfig = require("./TestConfiguration") |
|||
|
|||
exports.delay = ms => new Promise(resolve => setTimeout(resolve, ms)) |
|||
|
|||
let request, config |
|||
|
|||
exports.beforeAll = () => { |
|||
config = new TestConfig() |
|||
request = config.getRequest() |
|||
} |
|||
|
|||
exports.afterAll = () => { |
|||
if (config) { |
|||
config.end() |
|||
} |
|||
request = null |
|||
config = null |
|||
} |
|||
|
|||
exports.getRequest = () => { |
|||
if (!request) { |
|||
exports.beforeAll() |
|||
} |
|||
return request |
|||
} |
|||
|
|||
exports.getConfig = () => { |
|||
if (!config) { |
|||
exports.beforeAll() |
|||
} |
|||
return config |
|||
} |
|||
|
|||
Loading…
Reference in new issue