-
Notifications
You must be signed in to change notification settings - Fork 34
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
side effect of nodejs result in failure of invoking tests. #42
Comments
What does "will get side effects" mean? |
|
Sorry, I have no idea what you are talking about. |
What you are seeing, in the Node.js console or even in Chrome Developer Tools, is the default behavior.
|
yes, it is not displayed but it does exist. @janpio any comments? Or I missed something. |
This doesn't make any sense. What you describe is absolutely normal. Of course if you set |
I may find the trick. When I try to require this module in the test file, it is not loaded properly. |
Actually it can not require other modules as well. Not sure if I missed something. |
Still no real idea what you are talking about. Please post some code or a GitHub repo so we can try to understand what you are doing and what is going wrong and how. |
Sorry for the confuse. I do not upload the repo to github. I will ask if I can do this then. This now is only internal use. I have been stuck here for long. As usual, my script resides in myplugin/www/ and I try to add a package.json file in which I specified the module. But not with any luck. you can find the difference between the following path: Did I miss anything? |
Does your plugin work in a demo app? What kind of tests did you write? Where? What do they look like? |
|
I don't want to look at your repository, that is out of scope of what I offer for free here on GitHub issues ;) But I asked a few questions, and if you answer those I might be able to help you a bit. Please answer exactly the questions I asked, each and every one. Best quote the question you are answering before typing your response. |
I try to prove it with my test code. That's what I do now.
I try to require a module as people do in the normal nodejs code like: `var path = require("path")'
Not from a path. I want to import the module which should be local nodejs module I installed with
it looks like |
Does it work if you manually use it in a test app? |
No, the test code will need to read a config file but i can not get the |
Because of this, I am asking if a test app, a Cordova app you created locally and added this plugin manually, works instead of the tests you are writing. |
No. I have not written the front end code. I am not good at it. I |
when I try to test my plugin, I need compose some object like:
var config = {name:'john', sex:'male'}
or
var path = require("path")
These two will get side effects. But at this time, the following tests will not be executed.
Is this a bug or I missed anything?
The text was updated successfully, but these errors were encountered: