-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest-yoshi.config.js
29 lines (26 loc) · 986 Bytes
/
jest-yoshi.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const { emitConfigs, bootstrapServer } = require('./environment');
// The purpose of this file is to start your server and possibly additional servers
// like RPC/Petri servers.
//
// Because tests are running in parallel, it should start a different server on a different port
// for every test file (E2E and server tests).
//
// By attaching the server object (testkit result) on `globalObject` it will be available to every
// test file globally by that name.
module.exports = {
bootstrap: {
setup: async ({ globalObject }) => {
await emitConfigs();
globalObject.app = bootstrapServer();
await globalObject.app.start();
},
teardown: async ({ globalObject }) => {
await globalObject.app.stop();
},
},
puppeteer: {
// launch options: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions
// debugging tips: https://github.com/GoogleChrome/puppeteer#debugging-tips
devtools: false,
},
};