How can I run javascript tests in v3.0?

Hi,

I am trying to run jstests in cocos2d-js. I tried the following approaches:

cd cocos2d-js/samples/js-tests
# Failed attempt: .cocos-project.json not found
cocos run -p web
# Failed attempt: webpage loads but only visible big black box
python -m SimpleHTTPServer

Anybody have ideas how can I make it work?

Thank you,
Szymon

Hi, @nivuwsuoqrum

For this version, you can not run cocos command on an existing project, if you create a project with cocos new then it will work.
To run the tests, try this one out:

cd cocos2d-js
python -m SimpleHTTPServer

Then in your browser, type the ip address and port python just showed, and append with /samples/js-tests/index.html, for me, it was:

http://0.0.0.0:8000/samples/js-tests/index.html

This should work.

Huabin