Debug logs in test

This commit is contained in:
Daniel Imms
2021-07-16 06:05:34 -07:00
parent 176d42ef24
commit fcce57fc66

View File

@@ -682,8 +682,11 @@ import { assertNoRpc } from '../utils';
return;
}
data += sanitizeData(e.data);
console.log(`new data: "${e.data}"`);
console.log(`all data: "${data}"`);
// Multiple expected could show up in the same data event
while (expectedText.length > 0 && data.indexOf(expectedText[0]) >= 0) {
console.log(`found, shift expected: "${expectedText[0]}"`);
expectedText.shift();
// Check if all string are found, if so finish the test
if (expectedText.length === 0) {