MIT License

项目介绍

jmcdo29/testing-nestjs 是一个托管在 GitHub 上的开源项目,主要使用 TypeScript 编写,采用 MIT License 许可证,目前获得 3.0k 个 Star、377 次 Fork。

仓库全名
jmcdo29/testing-nestjs
开源许可证
MIT License
Star 数
3.0k
Fork 数
377
未关闭 Issue
23

README 摘要

testing-nestjs A repository to show off to the community methods of testing NestJS including Unit Tests, Integration Tests, E2E Tests, pipes, filters, interceptors, GraphQL, Mongo, TypeORM, and more! Project Structure Each folder is a fully functional Nest application on its own. All you need to do after cloning the repository is move into the folder, install the dependencies, and test! Or you could just, you know,…

完整内容见 GitHub 原始 README 或本页 。

常见问题

testing-nestjs 用什么语言开发?

主要使用 TypeScript 编写,采用 MIT License 许可证,目前有 3.0k 个 Star。

testing-nestjs 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 testing-nestjs 的源码?

可以直接克隆仓库:git clone https://github.com/jmcdo29/testing-nestjs.git,默认分支为 main;安装与运行步骤见仓库 README。

testing-nestjs 最近还在维护吗?

仓库最近一次更新为 2025年4月28日,当前有 23 个未关闭 Issue;Star 数为 3.0k,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

A repository to show off to the community methods of testing NestJS including Unit Tests, Integration Tests, E2E Tests, pipes, filters, interceptors, GraphQL, Mongo, TypeORM, and more!

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
3800
价值分
1924
活跃状态
活跃

语言占比

Dockerfile
HTML
Handlebars
JavaScript
Shell
TypeScript

README

Commitizen friendly Continuous Integration Testing Coffee

Nest Logo

testing-nestjs

A repository to show off to the community methods of testing NestJS including Unit Tests, Integration Tests, E2E Tests, pipes, filters, interceptors, GraphQL, Mongo, TypeORM, and more!

Project Structure

Each folder is a fully functional Nest application on its own. All you need to do after cloning the repository is move into the folder, install the dependencies, and test! Or you could just, you know, look at the test on GitHub too, no big deal.

Motivation

I’ve noticed a lot of people seem to get stuck on testing, and how to do it using the utilities given to us by Nest. Hopefully with a community driven repository of tests it will help others get a better understanding and feel for how to get tests running.

Please Note

This is not necessarily the Nest canonical way to test an application, nor is it the only way in any scenario. I will do my best to show different ways to run tests, but I will more than likely miss certain ways of running the tests, whether it is mocking in a specific way or otherwise. Again, this is a community maintained project and not a part of the official documentation. If you find other ways to test applications, great, I’d love to see them, but please do not think this is the only way.

Running the Project

  1. git clone https://github.com/jmcdo29/testing-nestjs.git
  2. cd testing-nestjs/<folderName>
  3. npm install OR yarn add OR pnpm install
  4. npm run test OR yarn test OR pnpm test

Contributing

Did I miss your favorite topic? Did I miss out on something you absolutely need tested? Well then open an issue, or better yet, a pull request! I’ll be happy to look over any topics and try to help figure out how to test them or to merge any PRs that add to the value of the repository. If you do end up making a pull request, please add a screenshot of the test coverage so others can see how well the tests run. The complex-sample branch has a good example.

Change log

The change log can be found on the Releases page.

Authors and license

Jay McDoniel and contributors. Thanks to everyone who’s helping with this effort!

MIT License, see the included License.md file.

评论

暂无评论