From 783f554e093533e67ff3b25e41f0fa03af49c2d6 Mon Sep 17 00:00:00 2001 From: Harminder Virk Date: Sun, 16 Jan 2022 13:02:48 +0530 Subject: [PATCH] ci: add logs for tests failing on windows --- test/youch.spec.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/youch.spec.mjs b/test/youch.spec.mjs index 7cb2a50..3a3f650 100644 --- a/test/youch.spec.mjs +++ b/test/youch.spec.mjs @@ -38,7 +38,7 @@ test.group('Youch', () => { youch .toJSON() .then(({ error }) => { - assert.equal(error.frames[0].filePath, __filename.replace(/\\/g, '/')) + assert.equal(error.frames[0].filePath, __filename) assert.equal(error.frames[0].isNative, false) done() }).catch(done) @@ -62,6 +62,8 @@ test.group('Youch', () => { // there are many reasons why the filepath in the stack does not exist. test('does not error on non-existing files', (assert, done) => { const error = new Error('this is bar') + console.log(error.stack) + console.log(__dirname) error.stack = error.stack.replace(__dirname, 'invalid-path') const youch = new Youch(error, {})