Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yeoman grunt test Pattern "path_public/todo/test/mock/**/*.js" does not match to any file

I'm new at yeoman staff so I'm following the good tutorial just at the bottom of the main page here and all works are nice other than the grunt test.

I get a Pattern path_public/todo/test/mock/**/*.js does not match any file and the test failed.

Here is a gist with all the stack. Does anybody here have an idea how to solve this?

like image 451
Whisher Avatar asked Oct 02 '22 22:10

Whisher


2 Answers

From http://newtriks.com/2013/06/11/automating-angularjs-with-yeoman-grunt-and-bower/

Run grunt karma grunt karma All tests pass! Chrome 27.0 (Mac): Executed 1 of 1 SUCCESS (0.085 secs / 0.018 secs) But wait….there is a warning: WARN [watcher]: Pattern "/Users/newtriks/src/newtriks-dev/js/angularjs-grunt-example/test/mock//.js" does not match any file. Let’s fix this. I tend to prefer to add directories as required and for now I have no mocks so lets comment out the include. Open karma.conf.js and comment out the line with 'test/mock//.js'. Run grunt karma again and the warning should be gone. Note: If you want to follow the same logic for karma-e2e.conf.js also this will ensure the warning is also fixed for the end-to-end tests.

like image 174
technoSpino Avatar answered Oct 13 '22 10:10

technoSpino


Of course if you'd like to know how to actually add a mock objects, check http://dailyjs.com/2013/05/16/angularjs-5/

like image 27
Mladen Mihajlovic Avatar answered Oct 13 '22 10:10

Mladen Mihajlovic