<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/aws-amplify-let-s-add-some-unit-tests-into-our-pipeline-vai1rzl9d" -->

---
title: AWS Amplify: Let&#x27;s add some unit tests into our pipeline
description: AWS Amplify&#x27;s built-in test phase only supports Cypress for E2E tests, not unit tests. A simple workaround is to run Jest unit tests in the build phase by...
canonical: https://daily.dev/posts/aws-amplify-let-s-add-some-unit-tests-into-our-pipeline-vai1rzl9d
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: AWS Amplify: Let&#x27;s add some unit tests into our pipeline | daily.dev
og:description: AWS Amplify&#x27;s built-in test phase only supports Cypress for E2E tests, not unit tests. A simple workaround is to run Jest unit tests in the build phase by...
og:url: https://daily.dev/posts/aws-amplify-let-s-add-some-unit-tests-into-our-pipeline-vai1rzl9d
og:image: https://api.daily.dev/og/posts/VaI1rzl9D.png
og:image:alt: AWS Amplify: Let&#x27;s add some unit tests into our pipeline
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Amplify: Let's add some unit tests into our pipeline

**[Playful Programming](https://daily.dev/sources/playfulprogramming)** · 2 min read · 0 upvotes · 0 comments

## Summary

AWS Amplify's built-in test phase only supports Cypress for E2E tests, not unit tests. A simple workaround is to run Jest unit tests in the build phase by chaining `npm run test && npm run build` in the `amplify.yml` preBuild/build commands, causing the pipeline to fail if tests don't pass before the build proceeds.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://playfulprogramming.com/posts/aws-amplify-lets-add-some-unit-tests-into-our-pipeline-5f7l>

## Similar posts on daily.dev

- [Frontend CI/CD in the age of AI -- Part 1](https://daily.dev/posts/frontend-ci-cd-in-the-age-of-ai----part-1-fjsyj336m) · Neciu Dan · 16 upvotes · 0 comments
- [Run Cypress at Scale in Harness CI with Smart Orchestration](https://daily.dev/posts/run-cypress-at-scale-in-harness-ci-with-smart-orchestration-dpfkrxg3z) · cypress · 0 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#aws](https://daily.dev/tags/aws), [#testing](https://daily.dev/tags/testing), [#cicd](https://daily.dev/tags/cicd), [#jest](https://daily.dev/tags/jest)

[View this post on daily.dev](https://daily.dev/posts/aws-amplify-let-s-add-some-unit-tests-into-our-pipeline-vai1rzl9d)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"AWS Amplify: Let's add some unit tests into our pipeline","url":"https://daily.dev/posts/aws-amplify-let-s-add-some-unit-tests-into-our-pipeline-vai1rzl9d","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/aws-amplify-let-s-add-some-unit-tests-into-our-pipeline-vai1rzl9d"},"datePublished":"2026-03-16T21:48:11.521Z","dateModified":"2026-03-16T21:56:16.009Z","description":"AWS Amplify's built-in test phase only supports Cypress for E2E tests, not unit tests. A simple workaround is to run Jest unit tests in the build phase by...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1063326d223d81f32c5f0bf98b1e5be0?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1063326d223d81f32c5f0bf98b1e5be0?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Playful Programming","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Playful Programming","logo":"https://media.daily.dev/image/upload/s--WoGOmY81--/f_auto,q_auto/v1773697582/logos/playfulprogramming?_a=BAMAMiiu0","url":"https://daily.dev/sources/playfulprogramming"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/aws-amplify-let-s-add-some-unit-tests-into-our-pipeline-vai1rzl9d","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,aws,testing,cicd,jest","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Playful Programming","item":"https://daily.dev/sources/playfulprogramming"},{"@type":"ListItem","position":3,"name":"AWS Amplify: Let's add some unit tests into our pipeline"}]}
```

