@web/test-runner-core
Advanced tools
Comparing version 0.6.7 to 0.6.8
# @web/test-runner-core | ||
## 0.6.8 | ||
### Patch Changes | ||
- 687089f: support source maps in error stack traces | ||
## 0.6.7 | ||
@@ -4,0 +10,0 @@ |
@@ -15,3 +15,4 @@ import { TestRunnerCoreConfig } from './TestRunnerCoreConfig'; | ||
}; | ||
quit: boolean; | ||
finished: boolean; | ||
stopped: boolean; | ||
} | ||
@@ -29,2 +30,3 @@ export declare class TestRunner extends EventEmitter<EventMap> { | ||
running: boolean; | ||
passed: boolean; | ||
focusedTestFile: string | undefined; | ||
@@ -37,5 +39,4 @@ private browserLaunchers; | ||
runTests(sessions: Iterable<TestSession>): Promise<void>; | ||
stop(): Promise<void>; | ||
stop(error?: any): Promise<void>; | ||
startDebugFocusedTestFile(): Promise<void[]>; | ||
quit(error?: any): Promise<void>; | ||
private onSessionFinished; | ||
@@ -42,0 +43,0 @@ } |
@@ -23,2 +23,3 @@ "use strict"; | ||
this.running = false; | ||
this.passed = false; | ||
this.pendingSessions = new Set(); | ||
@@ -67,3 +68,3 @@ this.config = config; | ||
catch (error) { | ||
this.quit(error); | ||
this.stop(error); | ||
} | ||
@@ -96,6 +97,11 @@ } | ||
this.running = false; | ||
this.quit(error); | ||
this.stop(error); | ||
} | ||
} | ||
async stop() { | ||
async stop(error) { | ||
if (error instanceof Error) { | ||
console.error('Error while running tests:'); | ||
console.error(error); | ||
console.error(''); | ||
} | ||
if (this.stopped) { | ||
@@ -116,2 +122,3 @@ return; | ||
await Promise.all(stopActions); | ||
this.emit('stopped', this.passed); | ||
} | ||
@@ -132,11 +139,2 @@ startDebugFocusedTestFile() { | ||
} | ||
async quit(error) { | ||
if (error instanceof Error) { | ||
console.error('Error while running tests:'); | ||
console.error(error); | ||
console.error(''); | ||
} | ||
await this.stop(); | ||
this.emit('quit', false); | ||
} | ||
async onSessionFinished(session) { | ||
@@ -173,5 +171,4 @@ var _a; | ||
setTimeout(async () => { | ||
await this.stop(); | ||
const passed = passedCoverage && Array.from(this.sessions.failed()).length === 0; | ||
this.emit('quit', passed); | ||
this.passed = passedCoverage && Array.from(this.sessions.failed()).length === 0; | ||
this.emit('finished', this.passed); | ||
}); | ||
@@ -182,3 +179,3 @@ } | ||
catch (error) { | ||
this.quit(error); | ||
this.stop(error); | ||
} | ||
@@ -185,0 +182,0 @@ } |
@@ -28,3 +28,4 @@ import { CoverageMapData } from 'istanbul-lib-coverage'; | ||
testCoverage?: CoverageMapData; | ||
userAgent?: string; | ||
} | ||
//# sourceMappingURL=TestSession.d.ts.map |
{ | ||
"name": "@web/test-runner-core", | ||
"version": "0.6.7", | ||
"version": "0.6.8", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
70220
850
1