When using Applitools Eyes JavaScript SDK and Jest, there is sometimes slower than normal performance.
To resolve this, add the following to the package.json file:
{
"jest": {
"extraGlobals": ["Math"],
"testEnvironment": "node"
}
}
The Eyes SDK needs the Math package to do some image processing before uploading screenshots to Applitools. Since Math is available on the shared memory by default, this causes performance to dramatically slow down, as now Jest needs to synchronize the VMs' access to a shared resource (locking it and adding access checks). This could cause the Eyes SDK to slow down by a factor of 2 to N times, depending on the number of VMs accessing Math at the same time.
You can read more about this in Jest's documentation here.
Note: This is not relevant to tests run on the Applitools Ultrafast Grid.