I have the following directory structure:
--app
|---dots
| |---some.js
|
|---entry.js
|---bootstrap.js
|---karma.conf.js
|---test-main.js
|---test
|---sampleSpec.js
Here is my sampleSpec
dependencies:
define([app/bootstrap, app/dots/some], function () {}]
So as I understand it I load bootstrap
and some
files into browser using requirejs. However, depending on whether I specify dots/*
folder in my karma.conf.js
file the karma server succeeds or fails to resolve dots/some.js
file. What I mean is if I specify the following pattern: 'app/**/*.js'
in karma.conf.js
:
files: [
'test-main.js',
{pattern: 'app/**/*.js', included: false},
{pattern: 'test/*Spec.js', included: false}
],
The dots/some.js
file is loaded into browser, if I specify like this pattern: 'app/*.js'
karma server returns 404
- file not found. Why is it so? Why should karma
care about the path if I load it using requirejs
?