angularjs


Karma skipping some test without error or xdescribe or xit


I have a bunch of tests that are totaly ignored.
I also looked for everywhere in the project for fdescribe, fit, xdescribe, xit, ddescribe or iit but there are none remainning. I just have a few xit but not much.
It seems to ignore all tests in a my /modules/ folder but it doesn't seem to be caused by misconfiguration because if I use fdescribe on some of them those are executed properly. Here is my karma.conf.js anyway in case you are intrested :
'use strict';
const stringify = require('stringify');
const babelify = require('babelify');
module.exports = (config) => {
config.set({
basePath: '',
frameworks: ['browserify', 'jasmine'],
files: [
'node_modules/jquery/dist/jquery.min.js',
'node_modules/angular/angular.js',
'node_modules/angular-route/angular-route.min.js',
'node_modules/angular-permission/dist/angular-permission.js',
'node_modules/angular-permission/dist/angular-permission-ng.js',
'node_modules/angular-sanitize/angular-sanitize.min.js',
'node_modules/angular-messages/angular-messages.min.js',
'node_modules/angular-mocks/angular-mocks.js',
'src/apps/publiques/app-publiques.module.js',
'src/apps/publiques/bootstrap-test.js',
'src/**/*.spec.js'
],
// the only folder that is excluded is correctly excluded
exclude: [
'src/modules/data-table/**/*.spec.js'
],
preprocessors: {
'src/apps/publiques/app-publiques.module.js': 'browserify',
'src/apps/publiques/bootstrap-test.js': 'browserify',
'src/**/*.spec.js': 'browserify',
},
browsers: ['PhantomJS'],
plugins: [
'karma-phantomjs-launcher',
'karma-jasmine',
'karma-browserify',
'karma-coverage',
'karma-mocha-reporter',
'karma-narrow-reporter',
'karma-jasmine-diff-reporter',
'karma-spec-reporter',
],
browserify: {
debug: true,
transform: [
babelify,
stringify,
],
},
reporters: [
'jasmine-diff',
// 'progress',
// 'mocha',
'narrow',
// 'spec'
],
specReporter: {
maxLogLines: 5, // limit number of lines logged per test
suppressErrorSummary: false, // do not print error summary
suppressFailed: false, // do not print information about failed tests
suppressPassed: false, // do not print information about passed tests
suppressSkipped: true, // do not print information about skipped tests
showSpecTiming: true, // print the time elapsed for each spec
failFast: true // test would finish with error when a first fail occurs.
},
mochaReporter: {
colors: {
success: 'green',
info: 'blue',
warning: 'yellow',
error: 'bgRed',
},
symbols: {
success: '+',
info: '#',
warning: '!',
error: 'x',
},
output: 'full',
},
phantomjsLauncher: {
exitOnResourceError: true,
},
port: 9876,
logLevel: config.LOG_DEBUG,
singleRun: true,
colors: true,
autoWatch: false,
});
};
End of karma log is
PhantomJS 2.1.1 (Windows 7 0.0.0) LOG: 'WARNING: Tried to load angular more than once.'
PhantomJS 2.1.1 (Windows 7 0.0.0): Executed 177 of 637 (skipped 10) SUCCESS
(0.858 secs / 0.82 secs)
[17:51:39] Karma Run Complete: No Failures
I turned out I had to beforeEach nested somewher like follow
describe('publiques-demandes-modifier.controller', () => {
beforeEach(() => {
angular.mock.module(app);
// mock window pour le test submitRedirect
const windowObj = { location: { href: '' } };
beforeEach(angular.mock.module(($provide) => {
$provide.value('$window', windowObj);
}));
angular.mock.inject((
I found out by using mocha reporter and by skipping last executed tests one by one to find the one responsible.

Related Links

Unknown provider: $httpProvider <- $http
Angular-translate, get word NOT from current language
PDF files no longer upload with firebase deploy
Is this correct way dependency injection in Angular?
Priority between custom and built-in directve
Bootstrap select combobox and ngRepeat options not working
Data is not passing from directive into template
How do I access ng-controller from directive?
How to add Admob in Ionic apps?
Default route for iron router
Angular giving injector error but still returning variables
dynamic routing UI-Router
How to create PDF using WebAPI with angular js
Breaking down an HTTP request to the same API into several HTTP requests
404 error when templateUrl is a php file in Ionic
Angular Routing with Ionic: 1 template for multiply views

Categories

HOME
nginx
ribbon
dependency-injection
dapper
ibm-content-navigator
real-time
luajit
pointers
cycle
titanium
skype
phone
chatbot
vps
google-direction
taskscheduler
bamboo
backgrid
birt
visual-paradigm
azure-sqldw
mcs
xodus
siebel
wcs
hybrid-mobile-app
blueprint-osgi
wso2-emm
ibm-infosphere
teradata-aster
phpcodesniffer
symfony-2.1
pivotaltracker
internal-storage
google-trends
incredibuild
nant
sonar-runner
baseline
vagrantfile
wakatime
c++98
application-structure
computation
privileges
number-systems
opensearchdescription
graql
mina
isomorphic-webpack
qtconsole
yeogurt
craigslist
python-social-auth
mq
playframework-2.4
wso2stratos
dynamic-allocation
aspnetdb
tla+
thread-dump
discount
winlogon
sjcl
opentaps
digital-filter
s3fs
c++builder-xe8
android-twitter
symbolicc++
stm32ldiscovery
activity-lifecycle
dbix-class
c#-5.0
dual-monitor
tyrus
twist
django-oscar
dynamicpdf
boilerplatejs
nested-sortable
branding
rapidsql
flex-datagrid
vwdexpress
exact-match
specs
scripting-bridge
piano
mcms
web-storage
webrick
tlv
user-acceptance-testing
innovation
automated-deploy

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App