Sounds perfect to me. So what's the next plan you wish to do? Wenli
On Sun, Oct 20, 2019 at 8:54 PM yufeng <yu_fen...@qq.com> wrote: > Hi Wenli, > > > Karma is a test runner, Jasmine will be still the testing framework in > karma's configuration file. > > > > > ------------------ 原始邮件 ------------------ > 发件人: "oviliazhang"<oviliazh...@gmail.com>; > 发送时间: 2019年10月20日(星期天) 晚上8:29 > 收件人: "dev"<dev@echarts.apache.org>;"yufeng"<yu_fen...@qq.com>; > > 主题: Re: Run unit test cases in node environment > > > > Hi Feng, > > Thanks for bringing this up. It is helpful to enable the unit tests to run > in the node environment so that we can do the auto test in CI. > > What's the benefit of using Karma over Jasmine if Jasmine can also provide > node testing? > > Wenli > > > On Sun, Oct 20, 2019 at 6:30 PM yufeng <yu_fen...@qq.com> wrote: > > > Now the jasimine framework which echarts is using for unit testing runs > on > > the web page? Can we improve it to run test cases in node environment? I > > recommend using karma, the unit testing tool, and choosing the jasmine > > framework in the configuration. > > > > > > The benefits of doing so are: > > 1. Jasmine framework supports running test cases in node environment, and > > the test results will be directly displayed in the terminal; > > 2. Karma is a JavaScript test execution process management tool based on > > node.js, which can be used to test all mainstream web browsers, and can > > also be integrated into CI tools. > > 3. Karma can make the test run in multiple browsers at the same time, > such > > as chrome and Firefox. Some codes run in different browsers with > different > > effects. The test results with karma are closer to the real environment. > > 4. Karma supports multiple plug-ins, such as code coverage, test reports, > > etc. > > 5. Currently, the framework used in UT is jasmine, so there is no need to > > modify the test cases. > > > > > > Of course, there are also some problems. For example, some errors about > > 'window' will be throwed when I try to modify it. > > > > > > I hope you give some suggestions.