Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: Revert to old assertions
  • Loading branch information
Jan Krems committed Apr 3, 2017
commit 6ce8c165c45a491bea8cfb3c67d2ae80e7c34dcb
18 changes: 9 additions & 9 deletions test/cli/break.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test('stepping through breakpoints', (t) => {
.then(() => {
t.match(
cli.output,
` in ${script}:1`,
`break in ${script}:1`,
'pauses in the first line of the script');
t.match(
cli.output,
Expand All @@ -30,7 +30,7 @@ test('stepping through breakpoints', (t) => {
.then(() => {
t.match(
cli.output,
` in ${script}:2`,
`break in ${script}:2`,
'pauses in next line of the script');
t.match(
cli.output,
Expand All @@ -41,7 +41,7 @@ test('stepping through breakpoints', (t) => {
.then(() => {
t.match(
cli.output,
` in ${script}:3`,
`break in ${script}:3`,
'pauses in next line of the script');
t.match(
cli.output,
Expand All @@ -52,7 +52,7 @@ test('stepping through breakpoints', (t) => {
.then(() => {
t.match(
cli.output,
` in ${script}:10`,
`break in ${script}:10`,
'pauses on the next breakpoint');
t.match(
cli.output,
Expand Down Expand Up @@ -94,21 +94,21 @@ test('stepping through breakpoints', (t) => {
.then(() => {
t.match(
cli.output,
' in timers.js',
'break in timers.js',
'entered timers.js');
})
.then(() => cli.stepCommand('cont'))
.then(() => {
t.match(
cli.output,
` in ${script}:16`,
`break in ${script}:16`,
'found breakpoint we set above w/ line number only');
})
.then(() => cli.stepCommand('cont'))
.then(() => {
t.match(
cli.output,
` in ${script}:6`,
`break in ${script}:6`,
'found breakpoint we set above w/ line number & script');
})
.then(() => cli.stepCommand(''))
Expand Down Expand Up @@ -145,7 +145,7 @@ test('sb before loading file', (t) => {
.then(() => {
t.match(
cli.output,
` in ${otherScript}:3`,
`break in ${otherScript}:3`,
'found breakpoint in file that was not loaded yet');
})
.then(() => cli.quit())
Expand Down Expand Up @@ -187,7 +187,7 @@ test('clearBreakpoint', (t) => {
.then(() => {
t.match(
cli.output,
` in ${script}:9`,
`break in ${script}:9`,
'hits the 2nd breakpoint because the 1st was cleared');
})
.then(() => cli.quit())
Expand Down
11 changes: 7 additions & 4 deletions test/cli/exceptions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test('break on (uncaught) exceptions', (t) => {
return cli.waitForInitialBreak()
.then(() => cli.waitForPrompt())
.then(() => {
t.match(cli.output, ` in ${script}:1`);
t.match(cli.output, `break in ${script}:1`);
})
// making sure it will die by default:
.then(() => cli.command('c'))
Expand All @@ -26,8 +26,9 @@ test('break on (uncaught) exceptions', (t) => {

// Next run: With `breakOnException` it pauses in both places
.then(() => cli.stepCommand('r'))
.then(() => cli.waitForInitialBreak())
.then(() => {
t.match(cli.output, ` in ${script}:1`);
t.match(cli.output, `break in ${script}:1`);
})
.then(() => cli.command('breakOnException'))
.then(() => cli.stepCommand('c'))
Expand All @@ -42,8 +43,9 @@ test('break on (uncaught) exceptions', (t) => {
// Next run: With `breakOnUncaught` it only pauses on the 2nd exception
.then(() => cli.command('breakOnUncaught'))
.then(() => cli.stepCommand('r')) // also, the setting survives the restart
.then(() => cli.waitForInitialBreak())
.then(() => {
t.match(cli.output, ` in ${script}:1`);
t.match(cli.output, `break in ${script}:1`);
})
.then(() => cli.stepCommand('c'))
.then(() => {
Expand All @@ -53,8 +55,9 @@ test('break on (uncaught) exceptions', (t) => {
// Next run: Back to the initial state! It should die again.
.then(() => cli.command('breakOnNone'))
.then(() => cli.stepCommand('r'))
.then(() => cli.waitForInitialBreak())
.then(() => {
t.match(cli.output, ` in ${script}:1`);
t.match(cli.output, `break in ${script}:1`);
})
.then(() => cli.command('c'))
// TODO: Remove FATAL ERROR once node doesn't show a FATAL ERROR anymore
Expand Down