caolan / caolan/nodeunit

Inject custom assertions to types.js by publishing assert in types.js

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

説明

I would like to add custom assertion so it can be used similarly to test.equal (e.g. test.contains).

The issue is that assert is required in two places:
In nodeunit.js, and in types.js.

The assert in nodeunit is exported, the one in type is not.
If this could be exposed then it would be very easy to add a custom assert and let the mechanism add them to test with the necessary wrapAssert.
Without it, it's still possible to use custom assert but cannot add them to the test level.

Thanks.

Ronnen

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

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

調査の方向性

まず、nodeunit.js で assert がどのように require されて export されているかを、types.js での使用方法と比較します。types.js の assertion を公開して、カスタム assertion を test オブジェクトにラップできるようにし、その後既存のテストスイートを実行して、テストレベルでカスタム assertion が利用できることを確認します。

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

評価

技術スタック
javascript, node.js
領域
testing-qa
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

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

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