Skip to content

Commit 0375eb0

Browse files
committed
Attempt to fix examples on Windows
1 parent 1269f47 commit 0375eb0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/v1/examples.test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ describe('examples', () => {
208208
// end::cypher-error[]
209209

210210
testResultPromise.then(loggedMsg => {
211-
expect(loggedMsg).toBe(
211+
expect(removeLineBreaks(loggedMsg)).toBe(removeLineBreaks(
212212
'Invalid input \'L\': expected \'t/T\' (line 1, column 3 (offset: 2))\n' +
213213
'"SELECT * FROM Employees WHERE name = $name"\n' +
214-
' ^');
214+
' ^'));
215215
done();
216216
});
217217
});
@@ -450,3 +450,7 @@ describe('examples', () => {
450450
});
451451
});
452452
});
453+
454+
function removeLineBreaks(string) {
455+
return string.replace(/(\r\n|\n|\r)/gm, ' ');
456+
}

0 commit comments

Comments
 (0)