From b777f4d9cda1dde49f5a2f31b022bfec18f32ee4 Mon Sep 17 00:00:00 2001 From: Mohammad Rad <79536486+m2rads@users.noreply.github.com> Date: Thu, 12 Dec 2024 07:01:54 -0800 Subject: [PATCH] Bug: page context error (#112) --- packages/shortest/CHANGELOG.md | 5 ++++- packages/shortest/package.json | 2 +- packages/shortest/src/core/runner/index.ts | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/shortest/CHANGELOG.md b/packages/shortest/CHANGELOG.md index c73b2740..99f3c2a1 100644 --- a/packages/shortest/CHANGELOG.md +++ b/packages/shortest/CHANGELOG.md @@ -5,7 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.0.6] - 2024-12-11 +## [0.0.7] - 2024-12-12 + +### Fixed +- Fixed hooks context not being reset between tests ### Added - Fixed Cli installation issues diff --git a/packages/shortest/package.json b/packages/shortest/package.json index ec89e207..d798874b 100644 --- a/packages/shortest/package.json +++ b/packages/shortest/package.json @@ -1,6 +1,6 @@ { "name": "@antiwork/shortest", - "version": "0.0.6", + "version": "0.0.7", "description": "AI-powered natural language end-to-end testing framework", "type": "module", "main": "./dist/index.js", diff --git a/packages/shortest/src/core/runner/index.ts b/packages/shortest/src/core/runner/index.ts index b2fa1722..902f0753 100644 --- a/packages/shortest/src/core/runner/index.ts +++ b/packages/shortest/src/core/runner/index.ts @@ -226,6 +226,11 @@ export class TestRunner { } finally { await this.browserManager.close(); + // reset all hooks + registry.beforeAllFns = []; + registry.afterAllFns = []; + registry.beforeEachFns = []; + registry.afterEachFns = []; } } catch (error) {