Gems:
jasmine 2.6
jasmine-juery-rails 2.0.3
jquery-rails 4.4.0
ruby 2.6.6
rails 5.0.2
This is how my JS folder is organized
> assets/javascripts
> 0_global
> utility.js
> ...
> 2_place_order
> cart.js
> item.js
> ...
> 0_global.js
> 2_place_order.js
Where the top level .js
files in the assets/javascripts
folder require the corresponding directory. I.e.,
0_global.js
//= require_directory ./0_global
2_place_order.js
//= require_directory ./2_place_order
I'm having trouble getting this set up to work with my jasmine. So in jasmine.yml
I required the top level js file, figuring that since that file already requires the directory, it should load, but it does not. I.e., the below doesn't work:
src_files:
- assets/0_global.js
- assets/2_place_order.js
Is there a different way to get this to work? I have also tried:
src_files:
- assets/0_global/*.js
- assets/2_place_order/*.js
To require the directory from the set up jasmine.yml
but this didn't work either. Would like to try to not have to enumerate every js file in the subdirectories.
Thanks!
from Jasmine Rails, src_files not being loaded from subdirectory
No comments:
Post a Comment