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

AngularJS page hopping around with semanticUI Tabs
how to fade parent $mdDialog?
chartjs 2+ how to specify bar chart colouring
Method Not Allowed Error after redirecting in AngularJS
Angular 1.5 md-autocomplete: find matches and display from multiple object keys
How to filter an array of objects based on an array of a specific object propert?
Angular TypeScript With Sublime Text 3
Angular Resolve Not Loading
How to use CasperJS to fill in AngularJS input fields w/out a form tag
Angularjs Modules - Packaging Directives and Their Controllers
How to insert “Dynamic Content” in uib-accordion developed with ng-repeat?
How to use Cordova Geolocation with OpenWeatherMap in Ionic?
angularjs get html inner value of the label inside ng-repeat
AngularJS test $q.all service jasmine with multi urls
Display Google Maps with current position with ngMap
how to next new sceen and hold nav title in ionic

Categories

HOME
apache
powershell
error-reporting
express
methods
if-statement
export
install4j
2sxc
mmu
suffix
icalcreator
system
chm
deprecated
sftp
kaa
lazy-evaluation
taskscheduler
nested
posix
state-machines
simulator
marker
angularjs-scope
data-recovery
readability
objection.js
hybrid-mobile-app
ssh-tunnel
jpgraph
pivotaltracker
proxypass
dublin-core
arquillian-drone
cgi
mod-expires
lauterbach
wiremock
interpretation
powermockito
amqp
winjs
netldap
sharepoint-list
glassfish-4
feature-selection
mailjet
delphi-xe2
opentbs
watin
shortcut
mixed-content
database-trigger
contravariance
pkg-config
python-decorators
formsy-react
asp.net-core-localization
android-ksoap2
jsxgraph
matchmaking
v+
bnfc
sdp
numberformatexception
barcode4j
hmvc
file-browser
file-recovery
swrevealviewcontroller
merchant-account
apache-commons-beanutils
rails-geocoder
bitrise
jquery-tooltip
transactional-memory
tab-completion
rackspace
execv
azcopy
doby-grid
odf
django-pyodbc
restrictions
resource-monitor
bankers-algorithm
ubuntu-unity
strcat
negation
branding
xenu
zend-controller
childbrowser
sqlgeometry
nextgen-gallery
exact-match
selectlist
java-interop
windows-xp-sp3
boxee
jquery-ui-theme
zeus
user-acceptance-testing
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