backupfire-firebase icon indicating copy to clipboard operation
backupfire-firebase copied to clipboard

Versions 1.3.0 and 1.4.0 break Jest test runner

Open ljle opened this issue 2 years ago • 3 comments

While updating our project's Firebase dependencies (including this package) running our unit tests suite (Jest) was failing (both locally and in CI) with this error:

image

I reverted everything and started to test every package and it turns out it's this one (you can see it at the end of the stack trace).

I tested both 1.3.0 and 1.4.0 and both error out, 1.2.0 however does not.

We're using Node 16.15.1 and firebase-tools 11.0.1

ljle avatar Jun 07 '22 17:06 ljle

Thank you for reporting! I managed to reproduce the problem and hopefully will find a solution real soon.

The root of the issue here is in firebase-tools dependency marked-terminal requiring node:process:

image

It is indeed a supported by Node.js v16:

image

But still breaks when running with Jest:

image

kossnocorp avatar Jun 08 '22 01:06 kossnocorp

The solution for you would be to upgrade Jest to the latest version. It seems that it incorrectly transpiles legit code. Could you please try upgrading it and running the code again?

I also reported a problem in marked-terminal that caused the error: https://github.com/mikaelbr/marked-terminal/pull/127

kossnocorp avatar Jun 08 '22 02:06 kossnocorp

Thanks for the quick response @kossnocorp, I'll try that and get back to you on this. Also this is unrelated but while I was deploying some functions I noticed this warning, thought you should know.

image

ljle avatar Jun 08 '22 18:06 ljle

Closing as this no longer is an issue on version 1.8.1.

ljle avatar Mar 15 '23 21:03 ljle