Q:

Karma - Load Files From Directories First

My karma files config:
files: [
    ...
    app/scripts/**/*.js
    ...
],

I have 4 directories under scripts directory, and app.js. 
I need the app.js to be loaded last (since it depends on other scripts). 
Any way to ensure this?

A:

You can use negation like this:
files: [
    'app/scripts/**/!(app).js',
    'app/scripts/app.js'
],

This makes app.js to be loaded at the end.

