飞跃高山与大洋的鱼飞跃高山与大洋的鱼
首页
先看
计算机
  • 数学
  • Linux
  • Arch
  • Manjaro
  • Ubuntu
  • CentOS
  • Kubernetes
  • Web
  • JavaScript
  • TypeScript
  • CSS
  • Canvas
  • Vue
  • Vite
  • NuxtJS
  • Webpack
  • Flutter
  • D3
  • Jest
  • WeApp
  • Utils
  • Nodejs
  • Nestjs
  • Golang
  • Nginx
  • Traefik
  • MySQL
  • MongoDB
  • Redis
  • Docker
算法
  • 像素风
  • Git
  • Github
  • VSCode
  • Chrome
  • Google
  • Bookmark scripts
  • 导航 🎉
  • VuePress 侧边栏插件
  • VuePress 官网
🚇 开往
首页
先看
计算机
  • 数学
  • Linux
  • Arch
  • Manjaro
  • Ubuntu
  • CentOS
  • Kubernetes
  • Web
  • JavaScript
  • TypeScript
  • CSS
  • Canvas
  • Vue
  • Vite
  • NuxtJS
  • Webpack
  • Flutter
  • D3
  • Jest
  • WeApp
  • Utils
  • Nodejs
  • Nestjs
  • Golang
  • Nginx
  • Traefik
  • MySQL
  • MongoDB
  • Redis
  • Docker
算法
  • 像素风
  • Git
  • Github
  • VSCode
  • Chrome
  • Google
  • Bookmark scripts
  • 导航 🎉
  • VuePress 侧边栏插件
  • VuePress 官网
🚇 开往
  • JEST

    • JEST
      • 碎碎念
      • Jest 目录
      • 参考资料

JEST

碎碎念

虽然一直很看好 TDD 的开发流程,但以此作为实践实在有些难。

Jest 目录

作为一个初学者,最令人困惑的莫过于 “我怎么知道要测试些什么”、“我可以测试些什么”,而抄一遍 jest 目录可以帮助缓解一下困惑:

.
├── Introduction
│   ├── Getting started
│   ├── Using Matchers
│   ├── Testing Asyncronous Code
│   ├── Setup and Teardown
│   ├── Mock Function
│   ├── Jest Platform
│   ├── Jest Community
│   └── More Resources
├── Guides
│   ├── Snapshot Testing
│   ├── An Async Example
│   ├── Timer Mocks
│   ├── Manual Mocks
│   ├── ES6 Class Mocks
│   ├── Bypassing module mocks
│   ├── ECMAScript Modules
│   ├── Using with webpack
│   ├── Using with puppeteer
│   ├── Using with MongoDB
│   ├── Using with DynamoDB
│   ├── DOM Mnaipulation
│   ├── Watch Plugins
│   ├── Migrating to Jest
│   ├── Troubleshooting
│   └── Architecture
├── Framework Guides
│   ├── Testing React Apps
│   ├── Testing React Native Apps
│   └── Testing Web Frameworks
└── API Reference
    ├── Globals
    ├── Expect
    ├── Mock Functions
    ├── The Jest Object
    ├── Configuring Jest
    ├── Jest Cli Options
    └── Environment Variables

参考资料

  1. jestjs.io
  2. Vue Test Utils
  3. ts-jest
  4. javascript-testing-best-practices
编辑文档!
上次更新:
贡献者: shanyuhai123