eggjs / eggjs/egg

[egg-bin]自身单元测试有18个失败的case,有解决的方案吗

Open
#4,647 1 comment 0 reactions 0 assignees View on GitHub
Inactive
Dominant language
TypeScript
Stars
19k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

## What happens?

[egg-bin]自身单元测试有18个失败的case:
```shell
➜ egg-bin-4.15.0 yarn test-local
yarn run v1.22.10
$ node bin/egg-bin.js test -t 3600000

test/lib/cmd/debug.test.js
real egg
1) should proxy
2) should proxy with port

test/lib/cmd/test.test.js
simplify mocha error stack
3) should clean co error stack
4) should clean callback error stack

test/ts.test.js
5) should support ts
✓ should support ts test (1133ms)
real application
6) should start app
7) should test app
8) should cov app
9) should cov app in cluster mod
error stacks
10) should correct error stack line number in starting app
11) should correct error stack line number in testing app
12) should correct error stack line number in covering app
egg.typescript = true
13) should start app
14) should fail start app with --no-ts
15) should test app
16) should cov app
egg.declarations = true
17) should load egg-ts-helper with dts flag
18) should load egg-ts-helper with egg.declarations = true
```
看了一下错误信息,都是`coffee`这个包抛出的:
![image](https://user-images.githubusercontent.com/10141527/113805047-53177e00-9792-11eb-972f-f57ba6cb7ef6.png)

## 复现步骤,错误日志以及相关配置

1. `yarn` 安装依赖
2. `yarn test-local` 运行本地单元测试

## 相关环境信息
- **操作系统**:macOS Big Sur 11.2.3
- **Node 版本**:v14.16.0
- **yarn 版本**:v1.22.10
- **Egg 版本**:^2.20.2
- **egg-bin版本**: 4.15.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.