-
Notifications
You must be signed in to change notification settings - Fork 25
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
Protractor Error: Cannot find module './.tmp/ngApimock/protractor.mock.js' #30
Comments
Hi @huiaic
What is the location of the
Then the
When you start ng-Apimock you start it with something like this. There you will tell ng-Apimock in which folder it needs to search for the JSON files. You can create a folder structure there per API, ng-Apimock will search with a glob. So you can do it like for example this
The filename of the JSON doesn't matter, I would advice you to give each JSON-file a unique I hope it helps. |
I have this issue also but I have a different folder layout. I am adding this to a Angular-CLI project, everything else is fine if I write the whole path but this defeats the point. Example below;
EDIT: Found my issue, in the require I was looking for mocking not ngApimock folder, thats what you get for copy and paste while watching Mock the Week. So in protractor.conf.js I added Having since been able to drop the basePath from the require; |
I have installed ng-apimock and see that v1.4.2 is inserted into my package.json
"ng-apimock": "^1.4.2"
Added the required setup in protractor config:
But when I run protractor, I'm getting this error:
My system info:
What am I missing?
Also, I have another question - the README says to create a separate file for each mock api call. But where should I save this file and do I need to name it something special?
The text was updated successfully, but these errors were encountered: