andrewrk / andrewrk/naught

Test setup enhancements?

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

説明

Is there a way we can enhance the tests? I find pretty difficult to work with them. Scenarios:
- When something is failing I can not run only that failing test, therefore debugging is more complicated
- When stuff fails, printing debug messages to stderr or stdout it will not help you because
- They are not displayed
- They change the expected output of the program and therefore the test fail because it checks std*

On top of that there is a weird thing that happens to me. Sometimes the tests still broken even if I reset the repo removing all of my changes. Here is the output:

```
SIGTERM in no daemon mode causes a stop...pass
(test setup) use server3.js...pass
(test setup) mkdir foo...pass
cli accepts non-default args...
assert.js:92
throw new assert.AssertionError({
^
AssertionError: actual:
unable to connect to ipc-file `some/dir/ipc`

1. the ipc file specified is invalid, or
2. the daemon process died unexpectedly

expected:
Bootup. booting: 0, online: 0, dying: 0, new_online: 0
SpawnNew. booting: 1, online: 0, dying: 0, new_online: 0
SpawnNew. booting: 2, online: 0, dying: 0, new_online: 0
SpawnNew. booting: 3, online: 0, dying: 0, new_online: 0
SpawnNew. booting: 4, online: 0, dying: 0, new_online: 0
SpawnNew. booting: 5, online: 0, dying: 0, new_online: 0
NewOnline. booting: 4, online: 0, dying: 0, new_online: 1
NewOnline. booting: 3, online: 0, dying: 0, new_online: 2
NewOnline. booting: 2, online: 0, dying: 0, new_online: 3
NewOnline. booting: 1, online: 0, dying: 0, new_online: 4
NewOnline. booting: 0, online: 0, dying: 0, new_online: 5

at assertEqual (/home/pedro/Documents/work/d3media/naught2/test/test.js:1045:3)
at /home/pedro/Documents/work/d3media/naught2/test/test.js:457:9
at /home/pedro/Documents/work/d3media/naught2/test/test.js:919:5
at ChildProcess. (/home/pedro/Documents/work/d3media/naught2/test/test.js:894:5)
at ChildProcess.EventEmitter.emit (events.js:98:17)
```

Test will not pass even if I reset the repo.

Some ideas:
- Group different test into different files
- Add events so we can trace application behavior like
- Split unit test from system/integration tests

I understand that these changes implies a lot of work but I will happily contribute to it if you are open to it.

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

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

評価

この issue はまだ評価されていません。

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

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