mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
fix screenshots (#18052)
This commit is contained in:
@@ -43,13 +43,17 @@ export function beforeSuite(opts: minimist.ParsedArgs, optionsTransform?: (opts:
|
||||
}
|
||||
|
||||
export function afterSuite(opts: minimist.ParsedArgs) {
|
||||
after(async function () {
|
||||
afterEach(async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
if (this.currentTest?.state === 'failed' && opts.screenshots) {
|
||||
const name = this.currentTest!.fullTitle().replace(/[^a-z0-9\-]/ig, '_');
|
||||
await app.captureScreenshot(name);
|
||||
}
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
if (app) {
|
||||
await app.stop();
|
||||
|
||||
Reference in New Issue
Block a user