@hasna/testers 0.0.44 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -94346,7 +94346,7 @@ import chalk6 from "chalk";
94346
94346
  // package.json
94347
94347
  var package_default = {
94348
94348
  name: "@hasna/testers",
94349
- version: "0.0.44",
94349
+ version: "0.0.45",
94350
94350
  description: "AI-powered QA testing CLI \u2014 spawns cheap AI agents to test web apps with headless browsers",
94351
94351
  type: "module",
94352
94352
  main: "dist/index.js",
@@ -97223,6 +97223,29 @@ function splitCsvOption(value) {
97223
97223
  const items = value?.split(",").map((item) => item.trim()).filter(Boolean) ?? [];
97224
97224
  return items.length > 0 ? items : undefined;
97225
97225
  }
97226
+ function describeStoredAssertion(value) {
97227
+ if (typeof value === "string")
97228
+ return value;
97229
+ try {
97230
+ return JSON.stringify(value);
97231
+ } catch {
97232
+ return String(value);
97233
+ }
97234
+ }
97235
+ function validateStoredAssertion(value) {
97236
+ if (typeof value === "string") {
97237
+ try {
97238
+ parseAssertionString(value);
97239
+ return null;
97240
+ } catch {
97241
+ return value;
97242
+ }
97243
+ }
97244
+ if (value && typeof value === "object" && typeof value.type === "string") {
97245
+ return null;
97246
+ }
97247
+ return describeStoredAssertion(value);
97248
+ }
97226
97249
  function AddForm({ onComplete }) {
97227
97250
  const { exit } = useApp();
97228
97251
  const [state, setState] = useState({
@@ -97887,11 +97910,9 @@ program2.command("run [url] [description]").alias("test").description("Run test
97887
97910
  for (const s2 of dryScenarios) {
97888
97911
  const assertionErrors = [];
97889
97912
  for (const a2 of s2.assertions ?? []) {
97890
- try {
97891
- parseAssertionString(a2);
97892
- } catch {
97893
- assertionErrors.push(a2);
97894
- }
97913
+ const error40 = validateStoredAssertion(a2);
97914
+ if (error40)
97915
+ assertionErrors.push(error40);
97895
97916
  }
97896
97917
  let authOk = true;
97897
97918
  if (s2.authPreset) {
package/dist/mcp/index.js CHANGED
@@ -52,7 +52,7 @@ var package_default;
52
52
  var init_package = __esm(() => {
53
53
  package_default = {
54
54
  name: "@hasna/testers",
55
- version: "0.0.44",
55
+ version: "0.0.45",
56
56
  description: "AI-powered QA testing CLI \u2014 spawns cheap AI agents to test web apps with headless browsers",
57
57
  type: "module",
58
58
  main: "dist/index.js",
@@ -46925,7 +46925,7 @@ import { join as join14 } from "path";
46925
46925
  // package.json
46926
46926
  var package_default = {
46927
46927
  name: "@hasna/testers",
46928
- version: "0.0.44",
46928
+ version: "0.0.45",
46929
46929
  description: "AI-powered QA testing CLI \u2014 spawns cheap AI agents to test web apps with headless browsers",
46930
46930
  type: "module",
46931
46931
  main: "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/testers",
3
- "version": "0.0.44",
3
+ "version": "0.0.45",
4
4
  "description": "AI-powered QA testing CLI — spawns cheap AI agents to test web apps with headless browsers",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",