caolan / caolan/nodeunit

Adding include paths to CLI testrunner

オープン
#67 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
1.9k
フォーク
359
PR マージ指標
30日以内にマージされた PR はありません

説明

I think it would be useful to have something like --include=PATH for the CLI testrunner. That way you can setup your testsuite without having to know about the actual location of the test suite in the directory structure. The call to the CLI testrunner then can take care of setting up the enviroment using --include. No need to repeat

```
require =("../lib/LibrarySubjectToBeTested");
```

but do

```
require('LibrarySubjectToBeTested");
```

and simply call

```
nodeunit --include=../lib/
```

I implemented a patch that would add this functionality to the testrunner. Have a look at it: 1db0b284d70829d4fe5f8a1fe20274562cdc5bd8
Please let me know what you think and if there's anything I missed. If you like it, feel free to pull it in.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず commit 1db0b284d70829d4fe5f8a1fe20274562cdc5bd8 と CLI testrunner のエントリーポイントを確認します。提案されている --include=PATH オプションがモジュール検索環境をどのように設定するかを確認し、その後、既存のテストスイートを実行します。nodeunit --include=../lib/ で相対パスなしに LibrarySubjectToBeTested を require できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, node.js
領域
cli, testing-qa
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。