0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
nodejs/test/debugger/test-debugger-repl.js
Roman Reiss f29762f4dd test: enable linting for tests
Enable linting for the test directory. A number of changes was made so
all tests conform the current rules used by lib and src directories. The
only exception for tests is that unreachable (dead) code is allowed.

test-fs-non-number-arguments-throw had to be excluded from the changes
because of a weird issue on Windows CI.

PR-URL: https://github.com/nodejs/io.js/pull/1721
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-19 21:21:27 +02:00

67 lines
1.0 KiB
JavaScript

'use strict';
var repl = require('./helper-debugger-repl.js');
repl.startDebugger('breakpoints.js');
var addTest = repl.addTest;
// Next
addTest('n', [
/break in .*:11/,
/9/, /10/, /11/, /12/, /13/
]);
// Watch
addTest('watch("\'x\'")');
// Continue
addTest('c', [
/break in .*:5/,
/Watchers/,
/0:\s+'x' = "x"/,
/()/,
/3/, /4/, /5/, /6/, /7/
]);
// Show watchers
addTest('watchers', [
/0:\s+'x' = "x"/
]);
// Unwatch
addTest('unwatch("\'x\'")');
// Step out
addTest('o', [
/break in .*:12/,
/10/, /11/, /12/, /13/, /14/
]);
// Continue
addTest('c', [
/break in .*:5/,
/3/, /4/, /5/, /6/, /7/
]);
// Set breakpoint by function name
addTest('sb("setInterval()", "!(setInterval.flag++)")', [
/1/, /2/, /3/, /4/, /5/, /6/, /7/, /8/, /9/, /10/
]);
// Continue
addTest('c', [
/break in node.js:\d+/,
/\d/, /\d/, /\d/, /\d/, /\d/
]);
// REPL and process.env regression
addTest('repl', [
/Ctrl/
]);
addTest('for (var i in process.env) delete process.env[i]', []);
addTest('process.env', [
/\{\}/
]);