The question was solved. Actually the Karma server did not serve any of my lib files. We should specify the location of the files that Karma server served by setting correct files option of karma.conf.js.
So I edited it as follows:
...,
files: [
{pattern: 'vendor/angular/angular.min.js', included: false},
{pattern: 'vendor/angular/angular-route.min.js', included: false},
{pattern: 'vendor/angular/angular-mocks.js', included: false},
{pattern: 'vendor/jquery/dist/jquery.min.js', included: false},
{pattern: 'vendor/underscore/underscore.js', included: false},
{pattern: 'backend/public/**/*.js', included: false},
{pattern: 'test/*.spec.js', included: false},
{pattern: 'test/**/*.spec.js', included: false},
{pattern: 'test/main.spec.js', included: false},
'test/test-main-cfg.js'
],
...
Practically it can more be simpler:
...,
files: [
{pattern: 'vendor/**/*.js', included: false},
{pattern: 'backend/public/**/*.js', included: false},
{pattern: 'test/*.spec.js', included: false},
{pattern: 'test/**/*.spec.js', included: false},
{pattern: 'test/main.spec.js', included: false},
'test/test-main-cfg.js'
],
...
And this is the official document of files option: Here