aria-ease 6.4.8 → 6.4.10

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.
@@ -2,7 +2,7 @@ import {
2
2
  ContractReporter,
3
3
  closeSharedBrowser,
4
4
  contract_default
5
- } from "./chunk-TQBS54MM.js";
5
+ } from "./chunk-GFKAJHCS.js";
6
6
  import "./chunk-I2KLQ2HA.js";
7
7
 
8
8
  // src/utils/test/src/test.ts
@@ -114,7 +114,7 @@ Error: ${error instanceof Error ? error.message : String(error)}`
114
114
  const devServerUrl = await checkDevServer(url);
115
115
  if (devServerUrl) {
116
116
  console.log(`\u{1F3AD} Running Playwright tests on ${devServerUrl}`);
117
- const { runContractTestsPlaywright } = await import("./contractTestRunnerPlaywright-D57V4RSU.js");
117
+ const { runContractTestsPlaywright } = await import("./contractTestRunnerPlaywright-7BCEDPZF.js");
118
118
  contract = await runContractTestsPlaywright(componentName, devServerUrl);
119
119
  } else {
120
120
  throw new Error(
@@ -169,6 +169,11 @@ ${violationDetails}
169
169
  return result;
170
170
  }
171
171
  var runTest = async () => {
172
+ return {
173
+ passes: [],
174
+ failures: [],
175
+ skipped: []
176
+ };
172
177
  };
173
178
  if (typeof window === "undefined") {
174
179
  runTest = async () => {
@@ -176,36 +181,36 @@ if (typeof window === "undefined") {
176
181
  `);
177
182
  const { exec } = await import("child_process");
178
183
  const chalk = (await import("chalk")).default;
179
- exec(
180
- `npx vitest --run --reporter verbose`,
181
- { cwd: process.cwd() },
182
- async (error, stdout, stderr) => {
183
- if (stdout) {
184
+ return new Promise((resolve, reject) => {
185
+ exec(
186
+ `npx vitest --run --reporter verbose`,
187
+ async (error, stdout, stderr) => {
184
188
  console.log(stdout);
185
- }
186
- if (stderr) {
187
- console.error(stderr);
188
- }
189
- if (!error || error.code === 0) {
190
- try {
191
- const { displayBadgeInfo, promptAddBadge } = await import("./badgeHelper-JOWO6RQG.js");
192
- displayBadgeInfo("component");
193
- await promptAddBadge("component", process.cwd());
194
- console.log(chalk.dim("\n" + "\u2500".repeat(60)));
195
- console.log(chalk.cyan("\u{1F499} Found aria-ease helpful?"));
196
- console.log(chalk.white(" \u2022 Star us on GitHub: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease"));
197
- console.log(chalk.white(" \u2022 Share feedback: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease/discussions"));
198
- console.log(chalk.dim("\u2500".repeat(60) + "\n"));
199
- } catch (badgeError) {
200
- console.error("Warning: Could not display badge prompt:", badgeError);
189
+ if (stderr) console.error(stderr);
190
+ const testsPassed = !error || error.code === 0;
191
+ if (testsPassed) {
192
+ try {
193
+ const { displayBadgeInfo, promptAddBadge } = await import("./badgeHelper-JOWO6RQG.js");
194
+ displayBadgeInfo("component");
195
+ await promptAddBadge("component", process.cwd());
196
+ console.log(chalk.dim("\n" + "\u2500".repeat(60)));
197
+ console.log(chalk.cyan("\u{1F499} Found aria-ease helpful?"));
198
+ console.log(chalk.white(" \u2022 Star us on GitHub: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease"));
199
+ console.log(chalk.white(" \u2022 Share feedback: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease/discussions"));
200
+ console.log(chalk.dim("\u2500".repeat(60) + "\n"));
201
+ } catch (badgeError) {
202
+ console.error("Warning: Could not display badge prompt:", badgeError);
203
+ }
204
+ resolve({ passes: [], failures: [], skipped: [] });
205
+ process.exit(0);
206
+ } else {
207
+ const exitCode = error?.code || 1;
208
+ reject(new Error(`Tests failed with code ${exitCode}`));
209
+ process.exit(exitCode);
201
210
  }
202
- process.exit(0);
203
- } else {
204
- const exitCode = error?.code || 1;
205
- process.exit(exitCode);
206
211
  }
207
- }
208
- );
212
+ );
213
+ });
209
214
  };
210
215
  }
211
216
  async function cleanupTests() {
@@ -80,7 +80,7 @@ ${"\u2550".repeat(60)}`);
80
80
  failureMessage,
81
81
  isOptional: test.isOptional
82
82
  };
83
- if (status === "skip" && test.requiresBrowser) {
83
+ if (status === "skip") {
84
84
  result.skipReason = "Requires real browser (addEventListener events)";
85
85
  }
86
86
  this.dynamicResults.push(result);
@@ -186,7 +186,7 @@ ${"\u2550".repeat(60)}`);
186
186
  `);
187
187
  if (totalFailures === 0 && this.skipped === 0 && this.optionalSuggestions === 0) {
188
188
  this.log(`\u2705 All ${totalRun} tests passed!`);
189
- this.log(` ${this.componentName} component meets WAI-ARIA expectations for Roles, States, Properties, and Keyboard Interaction \u2713`);
189
+ this.log(` ${this.componentName} component meets WAI-ARIA expectations for Roles, States, Properties, and Keyboard Interactions \u2713`);
190
190
  } else if (totalFailures === 0) {
191
191
  this.log(`\u2705 ${totalPasses}/${totalRun} required tests passed`);
192
192
  if (this.skipped > 0) {
@@ -195,7 +195,7 @@ ${"\u2550".repeat(60)}`);
195
195
  if (this.optionalSuggestions > 0) {
196
196
  this.log(`\u{1F4A1} ${this.optionalSuggestions} optional enhancement${this.optionalSuggestions > 1 ? "s" : ""} suggested`);
197
197
  }
198
- this.log(` ${this.componentName} component meets WAI-ARIA expectations for Roles, States, Properties, and Keyboard Interaction \u2713`);
198
+ this.log(` ${this.componentName} component meets WAI-ARIA expectations for Roles, States, Properties, and Keyboard Interactions \u2713`);
199
199
  } else {
200
200
  this.log(`\u274C ${totalFailures} test${totalFailures > 1 ? "s" : ""} failed`);
201
201
  this.log(`\u2705 ${totalPasses} test${totalPasses > 1 ? "s" : ""} passed`);