CircleCI fails Jest tests that use StringContaining

CircleCI tests fail on PR validation:

Summary of all failing tests
 FAIL  src/__tests__/index.test.ts (12.977 s)
  ● index › should run main script


    - Expected
    + Received

      Array [
    -   StringContaining "build",
    +   "/home/circleci/project/packages/my-package/src/scripts/build.ts",
    -   "--name",
    -   "plugin-test",

It is specifically failing tests that use expect.stringContaining (in the example above I have expect.stringContaining('build'). I have no idea why this is happening.