-
There is a single very simple test failing in my Github Actions PR Check. The test performs an Here's the thing. I cannot for the life of me reproduce this failure outside of github actions. This whole suite passes on my local machine. It even passes when I run the github workflow locally in docker using act and the command Even stranger, the reported diff of the failing test (expected, actual) is identical. The runner and my machine are using the exact same node and npm versions
I've also tried different NODE_ENV flags to no avail. Has anyone else run into this? Am I missing something obvious? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
I've also double checked that there are no caches causing strange behavior. |
Beta Was this translation helpful? Give feedback.
-
I understand that a diff can sometimes not account for object prototypes. I don't think that applies here, but I'll do a fresh JSON parse on BOTH objects to be sure. Still if thats the case, why does it specifically call out a subsection of the data structure that is identical? Update: A fresh stringify then parse made no difference. |
Beta Was this translation helpful? Give feedback.
-
I don't think this is related to the test runner. This appears to be related to the Also, the results don't appear to be identical. The failed assertion prints out the actual and expected values. You can copy them locally and diff them to see that they are different. As to why it happens in GitHub Actions - I have no idea. |
Beta Was this translation helpful? Give feedback.
-
TLDR: Test really was accurately failing. Test was tied to folder structure that was different in the Github action runner. The |
Beta Was this translation helpful? Give feedback.
TLDR: Test really was accurately failing. Test was tied to folder structure that was different in the Github action runner. The
act
command did not catch this, adding to the confusion.. Solution was to fix the folder structure pointer in the test.