sergei-startsev / karma-stacktrace Goto Github PK
View Code? Open in Web Editor NEWProvides human-readable sourcemapped stacktrace for running tests in a browser.
License: MIT License
Provides human-readable sourcemapped stacktrace for running tests in a browser.
License: MIT License
karma-stacktrace
duplicates errors in QUnit since Karma 1.0.0 because of adding errors throwing in debug.html
for each failed unit tests, QUnit handles it as a global failure
:
Karma throwing error without loosing stack trace
: karma-runner/karma@8a515ae
After updating from karma 4.1.0 to 6.3.4, I get this error:
Electron 12.0.2 (Node 14.16.0) ERROR
An error was thrown in afterAll
Uncaught SyntaxError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The URL 'undefined' is invalid. thrown
The code that tries to execute importScripts
is from karma-stacktrace
here:
karma-stacktrace/lib/stacktrace.js
Lines 185 to 195 in a20cf40
where stacktracejsURL
is undefined
.
Any idea why updating karma
breaks karma-stacktrace
or causes this error to show up?
Use window.addEventListener('error', ...)
instead of framework-specific logging hooks. This should allow to support any frameworks supported by Karma and log all errors only once.
Also update to https://github.com/stacktracejs/stacktrace.js/releases/tag/v2.0.0
package
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.0.1",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"karma-junit-reporter": "^1.2.0",
"karma-stacktrace": "^2.0.1",
karma
frameworks: [
'jasmine',
'@angular-devkit/build-angular',
'karma-stacktrace'
],
files: [
'node_modules/jquery/dist/jquery.min.js',
'node_modules/datatables.net/js/jquery.dataTables.js',
'node_modules/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js',
'src/typings/model.d.ts'
],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-junit-reporter'),
require('karma-stacktrace'),
require('@angular-devkit/build-angular/plugins/karma')
],
ng test ->
10% building 2/2 modules 0 active26 07 2019 14:41:52.984:ERROR [karma-server]: Server start failed on port 9876: Error: No provider for "framework:karma-stacktrace"! (Resolving: framework:karma-stacktrace)
window.opener
can be used to detect if the page is running in a popup / new window. But if you want to detect if it's running in an iframe (which is the default in Karma) you should use window.parent !== window
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.