---
title: "Parallelizing Jest and Cypress.io Tests on CircleCI"
description: "Jest's --shard flag combined with CircleCI's parallelism setting splits a unit test suite across containers using CIRCLE_NODE_INDEX and CIRCLE_NODE_TOTAL."
url: "https://swe.quest/articles/parallelizing-jest-and-cypress-io-tests-on-circleci-23e6432951c8c398"
canonical: "https://artsy.github.io/blog/2022/09/07/quick-tips-to-speed-up-ci/"
source: "Artsy Engineering"
published: "2022-09-07"
difficulty: "medium"
kind: "How-to"
reading_minutes: 4
tags: ["ci-cd","testing","developer-productivity","javascript"]
---

# Parallelizing Jest and Cypress.io Tests on CircleCI

A post on [Artsy Engineering](https://swe.quest/sources/artsy.md), published 2022-09-07, 4 min read, How-to. Original: [https://artsy.github.io/blog/2022/09/07/quick-tips-to-speed-up-ci/](https://artsy.github.io/blog/2022/09/07/quick-tips-to-speed-up-ci/)

## Summary

Jest's --shard flag combined with CircleCI's parallelism setting splits a unit test suite across containers using CIRCLE\_NODE\_INDEX and CIRCLE\_NODE\_TOTAL. This cut Artsy.net's average unit test time from about 10 minutes to just over 2. Cypress integration tests can also be parallelized without the paid Cypress Dashboard by piping \`circleci tests glob\` into \`circleci tests split\` and passing the result to \`cypress run --spec\`. That change brought smoke tests down from roughly 7 minutes to 3, all with a few lines of CI config.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- CircleCI config basics ([easy posts on Configuration management](https://swe.quest/tags/configuration.md?difficulty=easy))
- Jest test runner

## Keywords

Jest, Cypress, CircleCI, Artsy

## Related posts

- [AI coding has made CI a bottleneck, so we reworked ours to keep up](https://swe.quest/articles/ai-coding-has-made-ci-a-bottleneck-so-we-reworked-ours-to-keep-up-1594c74d280c863b.md): Linear · 2026-09-21 · Medium · 8 min read · CI/CD, Developer productivity, Cost optimization, TypeScript, Performance engineering
  Linear cut pull request CI wait time from over 6 minutes to about 5 and halved runner time per test, even as its test suites nearly quadrupled.
- [Mobile Developer Experience at Slack](https://swe.quest/articles/mobile-developer-experience-at-slack-f2b2b79d74a881fd.md): Slack Engineering · 2022-10-12 · Medium · 14 min read · Developer productivity, Mobile, CI/CD, Testing, Build systems
  A dedicated mobile Developer Experience team grew from 3 to 8 engineers and cut CI feedback time and failure rates by targeting the pain points that surveys, NPS and metrics like time to merge showed hurt developers most. iOS test time fell from about 50 minutes to an average of 9 by moving from Xcodebuild to Bazel with disk caching and bazel-diff, so only affected targets are tested.
- [End-to-end test probes with Playwright](https://swe.quest/articles/end-to-end-test-probes-with-playwright-7071f390329a920e.md): Zalando Engineering · 2024-07-18 · Medium · 6 min read · Testing, Observability, Frontend, TypeScript
  Zalando turned its end-to-end tests into production probes: a small set of Playwright scenarios covering critical customer journeys runs every 30 minutes and pages on-call when it fails.
- [Artsy Mobile 2025 Wrapped](https://swe.quest/articles/artsy-mobile-2025-wrapped-2eb10f2f6653645f.md): Artsy Engineering · 2026-01-09 · Medium · 7 min read · Mobile, React, Performance engineering, CI/CD, Refactoring & migrations
  Artsy's React Native apps (Eigen, Folio, Palette Mobile) adopted Expo and over-the-air updates after VS App Center's retirement, and all three moved to the new architecture.
- [Infrastructure Observability for Changing the Spend Curve](https://swe.quest/articles/infrastructure-observability-for-changing-the-spend-curve-815f49a6391b6804.md): Slack Engineering · 2021-10-07 · Medium · 10 min read · CI/CD, Cost optimization, Observability, Resilience, Capacity planning
  Slack bent the growth curve of its webapp CI spend, which had been rising about 10% month over month, by using observability (dashboards, metrics and tracing) to drive three changes.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
