I have an angularjs application with some directives that use jquery and bootstrap components. So, to check the directives, I defined the following file order in the karma.unit.conf.js file:
files = [
JASMINE,
JASMINE_ADAPTER,
'app/components/jquery/jquery.js',
'app/scripts/vendor/bootstrap.js',
'app/components/angular/angular.js',
'app/components/angular-mocks/angular-mocks.js',
'app/components/angular-ui/build/angular-ui.js',
'app/scripts/app.js',
'app/scripts/**/*.js',
'test/spec/unit/**/*.js'
];
If I load the first angularjs and angular -mocks and then jquery and bootstrap, the tests run and fail because angular uses its own jQLite. But if I change the order, as I wrote here, then this is what I get:
Edit:
, jQuery, ... bootstrap.js. bootstrap.js, ( , , ). bootstrap, ( ), :
PhantomJS 1.8 (Linux) Directive: tkModal should make hidden element visible FAILED[39m
at /home/ir/work/campari/app/components/jquery/jquery.js:1763
at /home/ir/work/campari/app/components/jquery/jquery.js:2833
at /home/ir/work/campari/app/components/jquery/jquery.js:2850
at /home/ir/work/campari/app/components/jquery/jquery.js:2850
at /home/ir/work/campari/app/components/jquery/jquery.js:2850
...
at /home/ir/work/campari/app/components/jquery/jquery.js:2850
at /home/ir/work/campari/app/components/jquery/jquery.js:2850
at /home/ir/work/campari/app/components/jquery/jquery.js:2850
at /home/ir/work/campari/app/components/jquery/jquery.js:3656
at /home/ir/work/campari/app/components/jquery/jquery.js:648
at /home/ir/work/campari/app/components/jquery/jquery.js:270
at /home/ir/work/campari/app/components/jquery/jquery.js:3657
at /home/ir/work/campari/app/components/jquery/jquery.js:3664
at /home/ir/work/campari/app/components/angular-mocks/angular-mocks.js:1589
at /home/ir/work/campari/app/components/angular-mocks/angular-mocks.js:1627
at /home/ir/work/campari/app/components/jquery/jquery.js:2850 15k , (, , jQuery internalData jquery.js: 1763).
:
, 2.3.0, 2.3.1. . https://github.com/twitter/bootstrap/issues/6835