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

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    - Expected
    + Received

      "node",
      Array [
    -   StringContaining "build",
    +   "/home/circleci/project/packages/my-package/src/scripts/build.ts",
        "--disallow-versioning",
    -   "--name",
    -   "plugin-test",
        "--run-script",
      ],

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.