Git Product home page Git Product logo

next-tdd-starter's Introduction

This is a Next.js project bootstrapped with create-next-app. In addition to the basic setup, this project includes useful packages and commands to help you follow a test-driven development approach and keep your codebase clean by linting and formatting on every commit.

Getting Started

First, install all packages:

npm install
# or
yarn

To start the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

Testing

Static Analysis

We use TypeScript, ESLint, and Prettier to keep our codebase clean and catch bugs before your program even runs. We use a husky precommit hook, which runs the TypeScript compiler for type checking, ESLint for linting, and Prettier for formatting so that no bugs or messy code ever reach our git history. Having a precommit hook also decreases the burden on your CI/CD service, which is cost-effective and less likely to be a bottleneck for larger teams. To run a complete static analysis:

npm run validate
# or
yarn validate

Unit Tests

We use Jest and @testing-library to write unit and integration tests. To run your tests:

npm run test
# or
yarn test

The is-ci-cli package will either run Jest in watch mode or Jest with a test coverage report depending on whether the test script is run locally or in your CI.

E2E Tests

We use Cypress for e2e testing. Cypress is a powerful tool for writing meaningful e2e tests that help us test entire user flows. Run

npx cypress open

to open the Cypress application and run your e2e tests.

next-tdd-starter's People

Contributors

dependabot[bot] avatar maxast avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.