Fix debugger detection for newer nodejs versions >= 7
This commit is contained in:
parent
a60e813709
commit
3f3186ee84
|
@ -20,6 +20,7 @@
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
const isNodeProccess = (typeof process === 'object' && process + '' === '[object process]');
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
@ -28,7 +29,11 @@ const Realm = require('realm');
|
||||||
const RealmTests = require('../js');
|
const RealmTests = require('../js');
|
||||||
|
|
||||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000;
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000;
|
||||||
const isDebuggerAttached = typeof v8debug === 'object';
|
let isDebuggerAttached = typeof v8debug === 'object';
|
||||||
|
if (!isDebuggerAttached && isNodeProccess) {
|
||||||
|
isDebuggerAttached = /--debug|--inspect/.test(process.execArgv.join(' '));
|
||||||
|
}
|
||||||
|
|
||||||
if (isDebuggerAttached) {
|
if (isDebuggerAttached) {
|
||||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 3000000;
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 3000000;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue