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

How do you $watchCollection multiple attributes in AngularJS?
ionic list shows bad styling
Why injecting pubnub.angular.service after injecting ngRoute is throwing error in AngularJS?
gulp-ng-annotate - how to use it?
Ionic Photo Capture & Crop
how to call angularJS service into a controller that is not included in a controller?
AngularJs search
Angular-ui-grid : Focus a specific cell of the selected row.
how to impliment flex with ng-repeat
Angular JS How to check if added word already exists
Angular trying to post Json/object data with html entities to server side but not working
How to download a file using Angular with Bearer token
Controller function is not called with ng-click when I pass data to an isolated scope
gulp-connect plugins connect.reload() not refreshing browser for following angular setup
Dynamic scope variable assign Angular
element not visible in protractor

Categories

HOME
.net
teamcity
maps
liferay
permutation
amazon-lex
pawn
rpm
gmail-api
fluid
native
mmu
limesurvey
liferay-6
wechat
jquery-globalize
clip
ghostscript
llvm-clang
overlay
json-deserialization
anonymous-class
robotics
hdinsight
scientific-notation
google-sitemap
adobe-connect
intro.js
subreport
discourse
vagrantfile
glassfish-4
jdedwards
quest
xlrd
aws-mobilehub
qmail
chilkat
imagej-macro
hardware-id
application-structure
payumoney
metro-ui-css
expat-parser
asp.net-core-localization
weighted-average
midje
share-open-graph
scintilla
any
python-social-auth
office-2013
aws-opsworks
sqliteopenhelper
aspnetdb
ec2-api-tools
mvcgrid.net
servicestack-razor
apache-commons-beanutils
pyral
weibo
python-2.4
google-plus-signin
android-twitter
visual-web-developer-2010
qtdbus
jinput
sony-smartwatch
jquery-validation-engine
apache-ace
postgresql-8.2
django-fixtures
joomla-k2
azcopy
palette
title-case
pagerjs
gui-testing
suhosin
4gl
itemrenderer
ontopia
scalac
jasmine-maven-plugin
membase
wse
webobjects
voting-system
radwindow
twofish
hit-highlighting
sharp-architecture
jquery-1.6
declarative-programming
ghci
e-texteditor

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