【发布时间】:2015-11-16 16:57:18
【问题描述】:
我是 NodeJS 的新手,对于实习生来说更是如此,他们试图学习实习生以在工作中进行测试,但无法通过他们自己的教程一步一步地启动实习生客户端,它总是让我返回错误:
C:\testproject\root>node ./node_modules/.bin/intern-client config=tests/intern
C:\testproject\root\node_modules\.bin\intern-client:2
basedir=`dirname "$0"`
^
SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
我在他们的网站https://github.com/theintern/intern 上关注快速入门,在创建文件夹后,通过 NodeJS 安装实习生并将他们的示例添加到测试/文件夹中。运行他们的脚本对确定他们的教程有什么问题没有帮助。根据他们的示例设置包和非功能套件,但仍然没有成功。
//...
loader: {
// Packages that should be registered with the loader in each testing environment
packages: [ { name: 'root', location: '.' } ],
// map: { 'intern-selftest': { dojo: 'intern-selftest/node_modules/dojo' } }
},
// Non-functional test suite(s) to run in each browser
suites: [ 'root/tests/intern' ],
//...
我对整个项目进行了几次核对,使用了 jslint 和 jshint,并且没有返回任何语法错误。 还尝试了一些不成功的组合:
https://github.com/theintern/intern-tutorial
https://gist.github.com/neonstalwart/6630466
有任何想法或真正可行的示例吗?
提前致谢。
【问题讨论】:
标签: intern