Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples重新设计 #46

Open
i5ting opened this issue Oct 16, 2022 · 3 comments
Open

examples重新设计 #46

i5ting opened this issue Oct 16, 2022 · 3 comments

Comments

@i5ting
Copy link
Owner

i5ting commented Oct 16, 2022

➜  ts-junit2 git:(main) tree examples
examples
├── hello
│   └── test.ts
└── run.ts

1 directory, 2 files

新的目录

➜  ts-junit2 git:(main)  tree examples
examples
├── README.md
├── run.ts
├── src
│   └── calculator.ts
└── test
    ├── a
    │   ├── b
    │   │   └── test3.ts
    │   └── test2.ts
    ├── test-class-disable.ts
    └── test.ts

4 directories, 7 files

测试

➜  examples git:(main) ts-node run.ts
find dir /Users/alfred/workspace/github/ts-junit2/examples/test
run ts: 1.407ms
default: 1.536ms
method skip undefined#addition5() reason: Disabled until bug #42 has been resolved
method skip undefined#addition5() reason: Disabled until bug #42 has been resolved
Class skip ClassDisableTests reason: Disabled all Clazz until bug #99 has been fixed
method skip undefined#addition5() reason: Disabled until bug #42 has been resolved
 BTests  • •   (2 / 2)
 ATests  • •   (2 / 2)
 ClassDisableTests    (0 / 0)
 MyFirstJUnitJupiterTests  BeforeAll initAll
BeforeEach
---AfterEach
• BeforeEach
---AfterEach
• AfterAll---
  (2 / 2)

  Total:     6
  Passed:    6
  Skipped:   0
  Duration:  0.59ms
@i5ting
Copy link
Owner Author

i5ting commented Oct 16, 2022

pr welcome

@i5ting
Copy link
Owner Author

i5ting commented Oct 16, 2022

执行 junit test,此时test是目录的情况下

➜  examples git:(main) junit test
find dir /Users/alfred/workspace/github/ts-junit2/examples/test
build ts: 452.209ms
Unhandled rejection Error: Cannot find module '/Users/alfred/workspace/github/ts-junit2/packages/cli/output/test.js'
Require stack:
- /Users/alfred/workspace/github/ts-junit2/packages/decorator/dist/load.js
- /Users/alfred/workspace/github/ts-junit2/packages/decorator/dist/index.js
- /Users/alfred/workspace/github/ts-junit2/packages/core/dist/context.js
- /Users/alfred/workspace/github/ts-junit2/packages/core/dist/index.js
- /Users/alfred/workspace/github/ts-junit2/packages/cli/dist/run.js
- /Users/alfred/workspace/github/ts-junit2/packages/cli/dist/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at /Users/alfred/workspace/github/ts-junit2/packages/decorator/dist/load.js:30:54

^C
➜  examples git:(main) ls /Users/alfred/workspace/github/ts-junit2/packages/cli
api-extractor.json  examples            package.json        tsconfig.check.json
calculator.ts       node_modules        src                 tsconfig.json
dist                output              test.ts
➜  examples git:(main) ls /Users/alfred/workspace/github/ts-junit2/packages/cli/output
Users         calculator.js examples      test
➜  examples git:(main)

实际上应该执行的文件是/Users/alfred/workspace/github/ts-junit2/packages/cli/output/test/test.js

另外output下面,最好是读取最近的packege.name,不然会出现冲突的情况。

@shulandmimi
Copy link
Contributor

实际上应该执行的文件是/Users/alfred/workspace/github/ts-junit2/packages/cli/output/test/test.js

  1. 另外一个 issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants