Skip to content

Commit e2255e9

Browse files
wip(tests): prefix console log with current test name
1 parent c48e9e2 commit e2255e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/testsTools.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async function createPage({ files, processors= {}}) {
6666

6767
const entry = { type: msg.type(), text: msg.text(), content: await Promise.all( msg.args().map(e => e.jsonValue()) ) };
6868
if ( isDev )
69-
console.log(entry);
69+
console.log(expect.getState().currentTestName, entry);
7070
output.push(entry);
7171
} );
7272

@@ -75,15 +75,15 @@ async function createPage({ files, processors= {}}) {
7575
// Emitted when an uncaught exception happens within the page.
7676

7777
const entry = { type: 'pageerror', text: error.message, content: error };
78-
console.log(entry);
78+
console.log(expect.getState().currentTestName, entry);
7979
output.push(entry);
8080
} );
8181

8282
page.on('error', msg => {
8383

8484
// Emitted when the page crashes.
8585

86-
console.log('error', msg);
86+
console.log(expect.getState().currentTestName, 'error', msg);
8787
});
8888

8989
//page.done = new Promise(resolve => page.exposeFunction('_done', resolve));

0 commit comments

Comments
 (0)