node_modules gets ignored when deployed unless explicitly allowed, and the regular install command will clobber what was in there.
This allowlists the node_modules directory and copies it into a new folder, runs the install command, and then merges the patched node_modules in so the patched modules are available in the test.
node_modules
gets ignored when deployed unless explicitly allowed, and the regular install command will clobber what was in there.This allowlists the
node_modules
directory and copies it into a new folder, runs the install command, and then merges the patchednode_modules
in so the patched modules are available in the test.