aria-ease 6.4.7 → 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.
@@ -3,6 +3,11 @@ interface JestAxeResult {
3
3
  raw: unknown;
4
4
  contract: unknown;
5
5
  }
6
+ interface ContractTestResult {
7
+ passes: string[];
8
+ failures: string[];
9
+ skipped: string[];
10
+ }
6
11
 
7
12
  /**
8
13
  * Runs static and interactions accessibility test on UI components.
@@ -12,7 +17,7 @@ interface JestAxeResult {
12
17
  */
13
18
 
14
19
  declare function testUiComponent(componentName: string, component: HTMLElement | null, url: string | null): Promise<JestAxeResult>;
15
- declare let runTest: () => Promise<void>;
20
+ declare let runTest: () => Promise<ContractTestResult>;
16
21
  /**
17
22
  * Cleanup function to close the shared Playwright browser
18
23
  * Call this in afterAll() or after all tests complete
@@ -3,6 +3,11 @@ interface JestAxeResult {
3
3
  raw: unknown;
4
4
  contract: unknown;
5
5
  }
6
+ interface ContractTestResult {
7
+ passes: string[];
8
+ failures: string[];
9
+ skipped: string[];
10
+ }
6
11
 
7
12
  /**
8
13
  * Runs static and interactions accessibility test on UI components.
@@ -12,7 +17,7 @@ interface JestAxeResult {
12
17
  */
13
18
 
14
19
  declare function testUiComponent(componentName: string, component: HTMLElement | null, url: string | null): Promise<JestAxeResult>;
15
- declare let runTest: () => Promise<void>;
20
+ declare let runTest: () => Promise<ContractTestResult>;
16
21
  /**
17
22
  * Cleanup function to close the shared Playwright browser
18
23
  * Call this in afterAll() or after all tests complete
@@ -1,4 +1,4 @@
1
- import { closeSharedBrowser, ContractReporter, contract_default } from './chunk-TQBS54MM.js';
1
+ import { closeSharedBrowser, ContractReporter, contract_default } from './chunk-GFKAJHCS.js';
2
2
  import { axe } from 'jest-axe';
3
3
  import fs from 'fs/promises';
4
4
 
@@ -106,7 +106,7 @@ Error: ${error instanceof Error ? error.message : String(error)}`
106
106
  const devServerUrl = await checkDevServer(url);
107
107
  if (devServerUrl) {
108
108
  console.log(`\u{1F3AD} Running Playwright tests on ${devServerUrl}`);
109
- const { runContractTestsPlaywright } = await import('./contractTestRunnerPlaywright-HV4EIRDH.js');
109
+ const { runContractTestsPlaywright } = await import('./contractTestRunnerPlaywright-O7FF3X67.js');
110
110
  contract = await runContractTestsPlaywright(componentName, devServerUrl);
111
111
  } else {
112
112
  throw new Error(
@@ -161,6 +161,11 @@ ${violationDetails}
161
161
  return result;
162
162
  }
163
163
  var runTest = async () => {
164
+ return {
165
+ passes: [],
166
+ failures: [],
167
+ skipped: []
168
+ };
164
169
  };
165
170
  if (typeof window === "undefined") {
166
171
  runTest = async () => {
@@ -168,36 +173,36 @@ if (typeof window === "undefined") {
168
173
  `);
169
174
  const { exec } = await import('child_process');
170
175
  const chalk = (await import('chalk')).default;
171
- exec(
172
- `npx vitest --run --reporter verbose`,
173
- { cwd: process.cwd() },
174
- async (error, stdout, stderr) => {
175
- if (stdout) {
176
+ return new Promise((resolve, reject) => {
177
+ exec(
178
+ `npx vitest --run --reporter verbose`,
179
+ async (error, stdout, stderr) => {
176
180
  console.log(stdout);
177
- }
178
- if (stderr) {
179
- console.error(stderr);
180
- }
181
- if (!error || error.code === 0) {
182
- try {
183
- const { displayBadgeInfo, promptAddBadge } = await import('./badgeHelper-HZKGOPB4.js');
184
- displayBadgeInfo("component");
185
- await promptAddBadge("component", process.cwd());
186
- console.log(chalk.dim("\n" + "\u2500".repeat(60)));
187
- console.log(chalk.cyan("\u{1F499} Found aria-ease helpful?"));
188
- console.log(chalk.white(" \u2022 Star us on GitHub: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease"));
189
- console.log(chalk.white(" \u2022 Share feedback: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease/discussions"));
190
- console.log(chalk.dim("\u2500".repeat(60) + "\n"));
191
- } catch (badgeError) {
192
- console.error("Warning: Could not display badge prompt:", badgeError);
181
+ if (stderr) console.error(stderr);
182
+ const testsPassed = !error || error.code === 0;
183
+ if (testsPassed) {
184
+ try {
185
+ const { displayBadgeInfo, promptAddBadge } = await import('./badgeHelper-HZKGOPB4.js');
186
+ displayBadgeInfo("component");
187
+ await promptAddBadge("component", process.cwd());
188
+ console.log(chalk.dim("\n" + "\u2500".repeat(60)));
189
+ console.log(chalk.cyan("\u{1F499} Found aria-ease helpful?"));
190
+ console.log(chalk.white(" \u2022 Star us on GitHub: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease"));
191
+ console.log(chalk.white(" \u2022 Share feedback: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease/discussions"));
192
+ console.log(chalk.dim("\u2500".repeat(60) + "\n"));
193
+ } catch (badgeError) {
194
+ console.error("Warning: Could not display badge prompt:", badgeError);
195
+ }
196
+ resolve({ passes: [], failures: [], skipped: [] });
197
+ process.exit(0);
198
+ } else {
199
+ const exitCode = error?.code || 1;
200
+ reject(new Error(`Tests failed with code ${exitCode}`));
201
+ process.exit(exitCode);
193
202
  }
194
- process.exit(0);
195
- } else {
196
- const exitCode = error?.code || 1;
197
- process.exit(exitCode);
198
203
  }
199
- }
200
- );
204
+ );
205
+ });
201
206
  };
202
207
  }
203
208
  async function cleanupTests() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aria-ease",
3
- "version": "6.4.7",
3
+ "version": "6.4.10",
4
4
  "description": "Accessibility infrastructure for the entire frontend engineering lifecycle. Build accessible patterns, run automated audits, verify component interactions, and gate deployments — all in one system.",
5
5
  "main": "dist/index.cjs",
6
6
  "type": "module",