Closed
Description
No issue template. Ref: #1982 (comment)
Test structure (approximately):
- test
- e2e
- cli
- client
- clients
- SockJSClient.test.js
- utils
- sendMessage.test.js
- overlay.test.js
- server
- servers
- SockJSServer.test.js
- utils
- tryParseInt.test.js
Test naming:
- class tests have same name as class ->
MyClass.js
->MyClass.test.js
- pure file like
defaultPort.js
->defaultPort.test.js
- options for server should be placed in
server
directory and have namecompress-option.test.js
- options for client should be placed in
client
directory and have namesockPath-options.test.js
Next we should improve test performance, many tests are very long and written in effective way.
Some of tests files should be merge in other, some of separated based on above structure.
I am WIP on this after merge this PR
Ideally each option should have:
- Unit test (own)
- Integration test (Server.test.js)
- E2E test (can be avoided for non client options)
- CLI test (can be avoided right now)
We should concentrate on 1
and 2
points right now.
Other changes what we should do:
- avoid using
--runInBand
it is decrease time on tests - union option.test.js and validation.test.js (they do same)
- rewrite some test in more effective way
- better naming of tests