Skip to content

Commit

Permalink
test: fixing test breaks
Browse files Browse the repository at this point in the history
* refactor of parallel/test-domain removed the `const common`
  declaration
* addition of inspector/test-inspector-exception required
  ChakraCore-specific logic

PR-URL: nodejs#299
Reviewed-By: Hitesh Kanwathirtha <[email protected]>
  • Loading branch information
kfarnung committed Jun 14, 2017
1 parent 8356c2b commit 7517f97
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
24 changes: 17 additions & 7 deletions test/inspector/test-inspector-exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,28 @@ function testBreakpointOnStart(session) {
{ 'method': 'Debugger.setPauseOnExceptions',
'params': {'state': 'none'} },
{ 'method': 'Debugger.setAsyncCallStackDepth',
'params': {'maxDepth': 0} },
{ 'method': 'Profiler.enable' },
{ 'method': 'Profiler.setSamplingInterval',
'params': {'interval': 100} },
'params': {'maxDepth': 0} }
];

if (process.jsEngine !== 'chakracore') {
commands.push(
{ 'method': 'Profiler.enable' },
{ 'method': 'Profiler.setSamplingInterval',
'params': {'interval': 100} });
}

commands.push(
{ 'method': 'Debugger.setBlackboxPatterns',
'params': {'patterns': []} },
{ 'method': 'Runtime.runIfWaitingForDebugger' }
];
{ 'method': 'Runtime.runIfWaitingForDebugger' });

// ChakraCore breaks on the first executable line rather than on the first
// line of the file.
const breakLine = common.isChakraEngine ? 21 : 0;

session
.sendInspectorCommands(commands)
.expectMessages(setupExpectBreakOnLine(0, script, session));
.expectMessages(setupExpectBreakOnLine(breakLine, script, session));
}

function testWaitsForFrontendDisconnect(session, harness) {
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'use strict';
// Simple tests of most basic domain functionality.

require('../common');
const common = require('../common');
const assert = require('assert');
const domain = require('domain');
const events = require('events');
Expand Down

0 comments on commit 7517f97

Please sign in to comment.