String cutoff error, prevents passing test
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 20/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- javascript, node.js
- 領域
- testing
研究方向
閱讀 tests/tests.js 中的 testWhile,並執行回報的測試以重現失敗。將兩個 deparse 呼叫與顯示的預期字串和實際字串進行比較;完成表示找出原因,並透過一個通過的測試確認針對性的修正。
由索引模型根據 Issue 內容生成。
描述
I apologize if this a quite obvious mistake on my part, but I have been staring at this for an hour. I don't know how this could possibly be a bug on your end, but it's worth a try.
The following test does not pass:
exports.testWhile = function(test){
test.expect(1);
var input = parseSingleStat("while(foo() < 1){bar();}");
var output = parse("var __t0 = foo(); while(__t0 < 1){bar(); var __t0 = foo(); }");
test.equal(deparse(output), deparse(tacifyFunctions.tacifyWhile(input)));
test.done();
}
The following test passes:
exports.testWhile = function(test){
test.expect(1);
var input = parseSingleStat("while(foo() < 1){bar();}");
var output = parse("var __t0 = foo(); while(__t0 < 1){bar(); var __t0 = foo(); }");
var e = deparse(output);
var o = deparse(tacifyFunctions.tacifyWhile(input));
test.equal(e, o);
test.done();
}
deparse returns a string. In the former case deparse(tacifyFunctions.tacifyWhile(input)) is returning a string
Here is output from the test
tests
✔ testNested
✖ testWhile
AssertionError: 'var __t0 = foo();\n\nwhile (__t0 < 1) {\n bar();\n var __t0 = foo();\n}' == 'while (__t0 < 1) {\n bar();\n var __t0 = foo();\n}'
at Object.assertWrapper as equal
at Object.exports.testWhile (/home/satshabad/CS/CS585/jaspect/tests/tests.js:53:8)
at Object.wrapTest (/usr/lib/node_modules/nodeunit/lib/core.js:235:16)
at wrapTest (/usr/lib/node_modules/nodeunit/lib/core.js:235:16)
at Object.exports.runTest (/usr/lib/node_modules/nodeunit/lib/core.js:69:9)
at exports.runSuite (/usr/lib/node_modules/nodeunit/lib/core.js:117:25)
at _concat (/usr/lib/node_modules/nodeunit/deps/async.js:508:13)
at async.forEachSeries.iterate (/usr/lib/node_modules/nodeunit/deps/async.js:118:13)
at async.forEachSeries.iterate (/usr/lib/node_modules/nodeunit/deps/async.js:129:25)
at _concat (/usr/lib/node_modules/nodeunit/deps/async.js:510:17)
FAILURES: 1/5 assertions failed (38ms)
I would appreciate any insight.
- 主要語言
- JavaScript
- 星號
- 1.9k
- 分支
- 359
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
caolan/nodeunit 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 25/100
-
難度 3/5 1-2 天 新手友好度 35/100
-
難度 2/5 1-3 小時 新手友好度 42/100
-
難度 3/5 1-2 天 新手友好度 35/100
-
難度 5/5 一週以上 新手友好度 20/100
相似的 Issue
-
documentation
難度 2/5 1-3 小時 新手友好度 78/100
PhyberApex/slds-json-schema-renderer#372 ·
維護者通常 1 天內回覆
-
usage: a custom provider's balance meters ("…%" in the balance path) ignore the Left/Used switch未關閉
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
[BUG] rag: sentence content can cross the reported sentence boundaries可能已有人在做 @LJK-ikun 今天認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 68/100
ericcornelissen/depreman#591 ·
維護者通常 1 天內回覆
-
bug/1-unconfirmed kind/bug
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆