-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question: does the tests work in the package? #11
Comments
I wanted to bump this. I am encountering the same issue:
Any insight into this would be appreciated. |
Upon further inspection, tests can be run as follows
then create a host HTML file: <html>
<head>
<script src="out.js"></script>
</head>
</html> And inspect the console log:
Or, run in testling:
|
addressed by #21 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My node version is 0.12.0
My platform is windows 7
I perform npm install vm-browserify
and then cd node_modules/vm-browserify
Then I execute npm test
C:\Users\IBM_ADMIN\VMTest\node_modules\vm-browserify>npm test
not ok test/vm.js ....................................... 0/5
Command: "C:\Program Files (x86)\nodejs\node.exe vm.js"
TAP version 13
not ok 1 ReferenceError: document is not defined
---
operator: error
expected:
actual: {}
stack:
ReferenceError:
"at NodeScript.Script.runInContext (C":
|
\Users\IBM_ADMIN\VMTest\node_modules\vm-browserify\index.js:56:18
)
"at Object.exports.(anonymous function).Script.(anonymous function)
[as runInNewContext](C": |
UsersIBM_ADMINVMTestnode_modulesvm-browserifyindex.js:122:2)
"at Test._cb (C":
|
\Users\IBM_ADMIN\VMTest\node_modules\vm-browserify\test\vm.js:7:1
)
"at Test.run (C":
|
\Users\IBM_ADMIN\VMTest\node_modules\vm-browserify\node_modules\t
pe\lib\test.js:53:14)
"at Immediate._onImmediate (C":
|
\Users\IBM_ADMIN\VMTest\node_modules\vm-browserify\node_modules\t
pe\lib\results.js:31:18)
"at processImmediate [as _immediateCallback](timers.js":
|
358:17)
...
not ok 2 ReferenceError: document is not defined
---
operator: error
expected:
actual: {}
stack:
ReferenceError:
"at NodeScript.Script.runInContext (C":
|
\Users\IBM_ADMIN\VMTest\node_modules\vm-browserify\index.js:56:18
[as runInContext](C": |
UsersIBM_ADMINVMTestnode_modulesvm-browserifyindex.js:122:2)
"at Test._cb (C":
|
\Users\IBM_ADMIN\VMTest\node_modules\vm-browserify\test\vm.js:30:
)
"at Test.run (C":
|
\Users\IBM_ADMIN\VMTest\node_modules\vm-browserify\node_modules\t
pe\lib\test.js:57:14)
"at Test. (C":
|
\Users\IBM_ADMIN\VMTest\node_modules\vm-browserify\node_modules\t
pe\lib\results.js:45:20)
"at Test.g (events.js":
|
199:16)
"at Test.emit (events.js":
|
104:17)
"at Test.end (C":
|
\Users\IBM_ADMIN\VMTest\node_modules\vm-browserify\node_modules\t
pe\lib\test.js:107:27)
"at Immediate._onImmediate (C":
|
\Users\IBM_ADMIN\VMTest\node_modules\vm-browserify\node_modules\t
pe\lib\results.js:31:18)
...
not ok 3 plan != count
---
operator: fail
expected: 2
actual: 1
...
not ok 4 plan != count
---
operator: fail
expected: 6
actual: 1
...
not ok 5 test/vm.js
---
exit: 1
command: |
"C:\Program Files (x86)\nodejs\node.exe vm.js"
...
total ................................................... 0/5
not ok
npm ERR! Test failed. See above for more details.
What did I do wrong? any special set up?
Thanks in advance for your help
The text was updated successfully, but these errors were encountered: