Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

Commit 6ce8c16

Browse files
author
Jan Krems
committed
test: Revert to old assertions
1 parent 22bf349 commit 6ce8c16

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

test/cli/break.test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test('stepping through breakpoints', (t) => {
1919
.then(() => {
2020
t.match(
2121
cli.output,
22-
` in ${script}:1`,
22+
`break in ${script}:1`,
2323
'pauses in the first line of the script');
2424
t.match(
2525
cli.output,
@@ -30,7 +30,7 @@ test('stepping through breakpoints', (t) => {
3030
.then(() => {
3131
t.match(
3232
cli.output,
33-
` in ${script}:2`,
33+
`break in ${script}:2`,
3434
'pauses in next line of the script');
3535
t.match(
3636
cli.output,
@@ -41,7 +41,7 @@ test('stepping through breakpoints', (t) => {
4141
.then(() => {
4242
t.match(
4343
cli.output,
44-
` in ${script}:3`,
44+
`break in ${script}:3`,
4545
'pauses in next line of the script');
4646
t.match(
4747
cli.output,
@@ -52,7 +52,7 @@ test('stepping through breakpoints', (t) => {
5252
.then(() => {
5353
t.match(
5454
cli.output,
55-
` in ${script}:10`,
55+
`break in ${script}:10`,
5656
'pauses on the next breakpoint');
5757
t.match(
5858
cli.output,
@@ -94,21 +94,21 @@ test('stepping through breakpoints', (t) => {
9494
.then(() => {
9595
t.match(
9696
cli.output,
97-
' in timers.js',
97+
'break in timers.js',
9898
'entered timers.js');
9999
})
100100
.then(() => cli.stepCommand('cont'))
101101
.then(() => {
102102
t.match(
103103
cli.output,
104-
` in ${script}:16`,
104+
`break in ${script}:16`,
105105
'found breakpoint we set above w/ line number only');
106106
})
107107
.then(() => cli.stepCommand('cont'))
108108
.then(() => {
109109
t.match(
110110
cli.output,
111-
` in ${script}:6`,
111+
`break in ${script}:6`,
112112
'found breakpoint we set above w/ line number & script');
113113
})
114114
.then(() => cli.stepCommand(''))
@@ -145,7 +145,7 @@ test('sb before loading file', (t) => {
145145
.then(() => {
146146
t.match(
147147
cli.output,
148-
` in ${otherScript}:3`,
148+
`break in ${otherScript}:3`,
149149
'found breakpoint in file that was not loaded yet');
150150
})
151151
.then(() => cli.quit())
@@ -187,7 +187,7 @@ test('clearBreakpoint', (t) => {
187187
.then(() => {
188188
t.match(
189189
cli.output,
190-
` in ${script}:9`,
190+
`break in ${script}:9`,
191191
'hits the 2nd breakpoint because the 1st was cleared');
192192
})
193193
.then(() => cli.quit())

test/cli/exceptions.test.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test('break on (uncaught) exceptions', (t) => {
1717
return cli.waitForInitialBreak()
1818
.then(() => cli.waitForPrompt())
1919
.then(() => {
20-
t.match(cli.output, ` in ${script}:1`);
20+
t.match(cli.output, `break in ${script}:1`);
2121
})
2222
// making sure it will die by default:
2323
.then(() => cli.command('c'))
@@ -26,8 +26,9 @@ test('break on (uncaught) exceptions', (t) => {
2626

2727
// Next run: With `breakOnException` it pauses in both places
2828
.then(() => cli.stepCommand('r'))
29+
.then(() => cli.waitForInitialBreak())
2930
.then(() => {
30-
t.match(cli.output, ` in ${script}:1`);
31+
t.match(cli.output, `break in ${script}:1`);
3132
})
3233
.then(() => cli.command('breakOnException'))
3334
.then(() => cli.stepCommand('c'))
@@ -42,8 +43,9 @@ test('break on (uncaught) exceptions', (t) => {
4243
// Next run: With `breakOnUncaught` it only pauses on the 2nd exception
4344
.then(() => cli.command('breakOnUncaught'))
4445
.then(() => cli.stepCommand('r')) // also, the setting survives the restart
46+
.then(() => cli.waitForInitialBreak())
4547
.then(() => {
46-
t.match(cli.output, ` in ${script}:1`);
48+
t.match(cli.output, `break in ${script}:1`);
4749
})
4850
.then(() => cli.stepCommand('c'))
4951
.then(() => {
@@ -53,8 +55,9 @@ test('break on (uncaught) exceptions', (t) => {
5355
// Next run: Back to the initial state! It should die again.
5456
.then(() => cli.command('breakOnNone'))
5557
.then(() => cli.stepCommand('r'))
58+
.then(() => cli.waitForInitialBreak())
5659
.then(() => {
57-
t.match(cli.output, ` in ${script}:1`);
60+
t.match(cli.output, `break in ${script}:1`);
5861
})
5962
.then(() => cli.command('c'))
6063
// TODO: Remove FATAL ERROR once node doesn't show a FATAL ERROR anymore

0 commit comments

Comments
 (0)