@momsfriendlydevco/cowboy 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/testkit.js +3 -1
- package/package.json +1 -1
package/lib/testkit.js
CHANGED
|
@@ -18,6 +18,7 @@ export let worker;
|
|
|
18
18
|
* @param {Object} [options] Additional options to mutate behaviour
|
|
19
19
|
* @param {Axios} [options.axios] Axios instance to mutate with the base URL, if specified
|
|
20
20
|
* @param {Boolean} [options.server=true] Initialize a local server - disable this if you're running your own
|
|
21
|
+
* @param {Boolean} [options.debug=false] Force debug as if `DEBUG=cowboy` was set
|
|
21
22
|
* @param {Function} [options.logOutput] Function to wrap STDOUT output. Called as `(line:String)`
|
|
22
23
|
* @param {Function} [options.logOutputErr] Function to wrap STDERR output. Called as `(line:String)`
|
|
23
24
|
* @param {String} [options.host='127.0.0.1'] Host to run Wrangler on
|
|
@@ -30,6 +31,7 @@ export function start(options) {
|
|
|
30
31
|
let settings = {
|
|
31
32
|
axios: null,
|
|
32
33
|
server: true,
|
|
34
|
+
debug: false,
|
|
33
35
|
logOutput: output => console.log('WRANGLER>', output),
|
|
34
36
|
logOutputErr: output => console.log('WRANGLER!', output),
|
|
35
37
|
host: '127.0.0.1',
|
|
@@ -38,6 +40,7 @@ export function start(options) {
|
|
|
38
40
|
...options,
|
|
39
41
|
};
|
|
40
42
|
|
|
43
|
+
if (settings.debug) Debug.enable('cowboy');
|
|
41
44
|
debug('Start cowboy testkit');
|
|
42
45
|
let wranglerConfig; // Eventual wrangler config
|
|
43
46
|
|
|
@@ -93,7 +96,6 @@ export function start(options) {
|
|
|
93
96
|
});
|
|
94
97
|
})
|
|
95
98
|
// }}}
|
|
96
|
-
// .then(()=> new Promise(resolve => setTimeout(resolve, 10 * 1000)))
|
|
97
99
|
// Mutate axios if provided {{{
|
|
98
100
|
.then(()=> {
|
|
99
101
|
if (settings.axios) {
|