deepEqual not Usable on Buffers
- 主要言語
- JavaScript
- スター
- 1.9k
- フォーク
- 359
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Using nodeunit 0.6 on node 0.4.12 (and others), the following test:
```
exports.test = function (test) {
var a = new Buffer([0]), b = new Buffer([0]);
test.deepEqual(a, b);
test.done();
};
```
Fails with:
```
test
✖ test
AssertionError: deepEqual
at Object.deepEqual (/home/smith/nu/node_modules/nodeunit/lib/types.js:83:39)
at Object. (/home/smith/nu/test.js:3:10)
at Object. (/home/smith/nu/node_modules/nodeunit/lib/core.js:233:16)
at /home/smith/nu/node_modules/nodeunit/lib/core.js:233:16
at Object.runTest (/home/smith/nu/node_modules/nodeunit/lib/core.js:69:9)
at /home/smith/nu/node_modules/nodeunit/lib/core.js:115:25
at /home/smith/nu/node_modules/nodeunit/deps/async.js:508:13
at /home/smith/nu/node_modules/nodeunit/deps/async.js:118:13
at /home/smith/nu/node_modules/nodeunit/deps/async.js:134:9
at /home/smith/nu/node_modules/nodeunit/deps/async.js:507:9
```
This test passes with nodeunit 0.4. It would be nice if deepEqual, or some method, worked to compare Buffers.
This is used on https://github.com/cramerdev/gearman-node/blob/master/test/test-packet.js, among other places.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
失敗した deepEqual アサーションが報告されている lib/types.js:83 から始め、報告書にある Buffer の例で問題を再現してください。等しい 2 つの Buffer に対する回帰テストを追加し、deepEqual がそれらを受け入れる一方で、等しくない Buffer については引き続き正しく報告することを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- testing-qa
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100