timdream / jszhuyin

JS 注音:JavaScript 自動選字注音輸入法;"Smart" Chinese Zhuyin Input Method in JavaScript.
https://jszhuyin.timdream.org/
MIT License
225 stars 19 forks source link

A command runner for performance test and general test #32

Closed timdream closed 8 years ago

timdream commented 8 years ago

The "unit" tests and "interactive" tests are not currently written in a understandable way. It also rely on execution orders of sync and async JSZhuyin and JSZhyinClient. This makes the API a little weak and make safely removal of all the complexity in JSZhuyinClient hard.

I think the right solution here is for all the automation, we would need a runner/wrapper that takes an array with a series of commands (and/or callbacks) in an array, and run them against a JSZhuyin/JSZhuyinClient instance. All the test should be rewrite to call that wrapper (and probably rewrite to be run in Mocha) so we can sure the program do the same thing in {JSZhuyin|JSZhuyinClient} in {Browser|NodeJS}.

timdream commented 8 years ago

Fixed by 2d3ef2c etc. Tests has moved to the new suite and being tested on in NodeJS and 3 modes in the browser.