Hi there
I've just started using Cordova 2.7.0.
I am now trying to run tests in cordova-js in the same way as readme.md
explains but it failed with syntax error like the following.
**************************************************************************
error eval()ing D:\work\cordova-js\pkg\cordova.test.js: SyntaxError: Unexpected
token .
SyntaxError: Unexpected token .
at module.exports.node [as action] (D:\work\cordova-js\test\runner.js:72:18)
at TaskBase.run
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\task\task.js:220:21)
at TaskBase.handlePrereqComplete
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\task\task.js:204:12)
at null.<anonymous>
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\task\task.js:173:16)
at g (events.js:175:14)
at EventEmitter.emit (events.js:92:17)
at TaskBase.complete
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\task\task.js:235:10)
at api.complete
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\api.js:182:15)
at TaskBase.run
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\task\task.js:228:7)
at TaskBase.runPrereqs
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\task\task.js:118:12)
**************************************************************************
I am using the following software for this test.
Windows 7 Pro 64bit
Cordova version 2.7.0
NodeJS(x64) version 0.10.12
npm version 1.2.32 (bundled with NodeJS)
python(x64) version 2.7.5
Visual C++ 2010 express
The procedure to setup test is the following
1. Download source code of cordova-js
2. Open command prompt at the top of cordova-js repository
3. Type "npm install" to install dependencies
4. Type "npm install -g jake" to install jake
5. Type "npm install -g jshint" to install jshint
6. Type "jake" to build, hint, and test
When I typed "npm install" at 3., warning message is displayed as the following:
***************************************************************************
> [email protected] install
> D:\work\cordova-js\node_modules\jsdom\node_modules\contextify
> node-gyp rebuild
D:\work\cordova-js\node_modules\jsdom\node_modules\contextify>node "C:\Program
Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js"
rebuild
contextify.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323):
warning C4530: C++ exception handler used, but unwind semantics are not
enabled. Specify /EHsc
[D:\work\cordova-js\node_modules\jsdom\node_modules\contextify\build\contextify.vcxproj]
C:\Users\blahblah\.node-gyp\0.10.12\deps\v8\include\v8.h(184): warning C4506:
no definition for inline function 'v8::Persistent<T>
v8::Persistent<T>::New(v8::Handle<T>)'
[D:\work\cordova-js\node_modules\jsdom\node_modules\contextify\build\contextify.vcxproj]
with
[
T=v8::Object
]
C:\Users\blahblah\.node-gyp\0.10.12\deps\v8\include\v8.h(184): warning C4506:
no definition for inline function 'v8::Persistent<T>
v8::Persistent<T>::New(v8::Handle<T>)'
[D:\work\cordova-js\node_modules\jsdom\node_modules\contextify\build\contextify.vcxproj]
with
[
T=v8::FunctionTemplate
]
Creating library
D:\work\cordova-js\node_modules\jsdom\node_modules\contextify\build\Release\contextify.lib
and object
D:\work\cordova-js\node_modules\jsdom\node_modules\contextify\build\Release\contextify.exp
Generating code
Finished generating code
contextify.vcxproj ->
D:\work\cordova-js\node_modules\jsdom\node_modules\contextify\build\Release\\contextify.node
***************************************************************************
After that, I typed "jake build" and "jake test" then it seems that build is
successfully completed but jake test fails with the following error.
***************************************************************************
starting node-based tests
WARNING: file name lib\test\androidexec.js is missing the license header
WARNING: file name lib\test\blackberryexec.js is missing the license header
WARNING: file name lib\test\blackberryplatform.js is missing the license header
WARNING: file name lib\test\iosexec.js is missing the license header
WARNING: file name lib\test\androidexec.js is missing the license header
WARNING: file name lib\test\blackberryexec.js is missing the license header
WARNING: file name lib\test\blackberryplatform.js is missing the license header
WARNING: file name lib\test\iosexec.js is missing the license header
generated platform: test in 125ms
error eval()ing D:\work\cordova-js\pkg\cordova.test.js: SyntaxError: Unexpected
token .
SyntaxError: Unexpected token .
at module.exports.node [as action] (D:\work\cordova-js\test\runner.js:72:18)
at TaskBase.run
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\task\task.js:220:21)
at TaskBase.handlePrereqComplete
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\task\task.js:204:12)
at null.<anonymous>
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\task\task.js:173:16)
at g (events.js:175:14)
at EventEmitter.emit (events.js:92:17)
at TaskBase.complete
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\task\task.js:235:10)
at api.complete
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\api.js:182:15)
at TaskBase.run
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\task\task.js:228:7)
at TaskBase.runPrereqs
(C:\Users\blahblah\AppData\Roaming\npm\node_modules\jake\lib\task\task.js:118:12)
***************************************************************************
Does anyone know what is the cause of this error?
Best regards,
Regards,
Shingo Toda