@cypress/angular
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -11,3 +11,3 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { Component, EventEmitter, SimpleChange } from '@angular/core'; | ||
import { Injectable, Component, EventEmitter, SimpleChange, ErrorHandler } from '@angular/core'; | ||
import { getTestBed, TestBed } from '@angular/core/testing'; | ||
@@ -99,2 +99,10 @@ import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; | ||
globalThis.it.skip = globalThis.xit; | ||
let CypressAngularErrorHandler = class CypressAngularErrorHandler { | ||
handleError(error) { | ||
throw error; | ||
} | ||
}; | ||
CypressAngularErrorHandler = __decorate([ | ||
Injectable() | ||
], CypressAngularErrorHandler); | ||
/** | ||
@@ -115,2 +123,11 @@ * Bootstraps the TestModuleMetaData passed to the TestBed | ||
} | ||
if (!testModuleMetaData.providers) { | ||
testModuleMetaData.providers = []; | ||
} | ||
// Replace default error handler since it will swallow uncaught exceptions. | ||
// We want these to be uncaught so Cypress catches it and fails the test | ||
testModuleMetaData.providers.push({ | ||
provide: ErrorHandler, | ||
useClass: CypressAngularErrorHandler, | ||
}); | ||
// check if the component is a standalone component | ||
@@ -117,0 +134,0 @@ if (component.ɵcmp.standalone) { |
{ | ||
"name": "@cypress/angular", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Test Angular Components using Cypress", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20078
401