-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set up Vitest * Run yarn dedupe * Extract API * Remove unused dependencies * Remove script no longer needed * Update yarn.lock * Add vitest workspace and fix lib type checking * Add vitest typings workaround * Add noEmit to all test/tsconfig.js files * Extract API * Add back Assertions type * Remove unused devDependencies found by knip * Add back original alfa-test as alfa-test-deprecated * Delete parts from old alfa-test that are no longer needed * Update yarn.lock * Add vitest as dependency to alfa-test and update valid external dependencies * Add new API report * Add changeset --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d2515d9
commit de60ce9
Showing
88 changed files
with
1,908 additions
and
432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@siteimprove/alfa-test-deprecated": minor | ||
"@siteimprove/alfa-test": minor | ||
--- | ||
|
||
**Breaking:** The `alfa-test` package is now called `alfa-test-deprecated` and a new `alfa-test` package was added. | ||
|
||
Consumers can either migrate by replacing references to `alfa-test` with `alfa-test-deprecated` or they can attempt to use `alfa-test` which builds on [Vitest](https://vitest.dev). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { defineConfig } from "vitest/config"; | ||
|
||
export default defineConfig({ | ||
test: { | ||
include: ["test/**/*.spec.ts?(x)"], | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default ["packages/alfa-*", "!packages/alfa-test-deprecated"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
## API Report File for "@siteimprove/alfa-test-deprecated" | ||
|
||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
```ts | ||
|
||
// @public (undocumented) | ||
export interface Assertions { | ||
// (undocumented) | ||
<T>(value: T, message?: string): void; | ||
// (undocumented) | ||
deepEqual<T>(actual: T, expected: T, message?: string): void; | ||
// (undocumented) | ||
equal<T>(actual: T, expected: T, message?: string): void; | ||
// (undocumented) | ||
fail(message?: string): never; | ||
// (undocumented) | ||
notDeepEqual<T>(actual: T, expected: T, message?: string): void; | ||
// (undocumented) | ||
notEqual<T>(actual: T, expected: T, message?: string): void; | ||
// (undocumented) | ||
rejects<T>(block: Function | Promise<T>, error?: RegExp | Function | Object | Error, message?: string): void; | ||
// (undocumented) | ||
throws(block: Function, error?: RegExp | Function | Object | Error, message?: string): void; | ||
} | ||
|
||
// @public (undocumented) | ||
export interface Controller<T = number> { | ||
// (undocumented) | ||
iterations: number; | ||
// (undocumented) | ||
seed?: number; | ||
// (undocumented) | ||
wrapper: (rng: RNG<number>, iteration: number) => RNG<T>; | ||
} | ||
|
||
// Warning: (ae-internal-missing-underscore) The name "defaultController" should be prefixed with an underscore because the declaration is marked as @internal | ||
// | ||
// @internal (undocumented) | ||
export const defaultController: Controller<number>; | ||
|
||
// Warning: (ae-internal-missing-underscore) The name "format" should be prefixed with an underscore because the declaration is marked as @internal | ||
// | ||
// @internal (undocumented) | ||
export function format(name: string, error: Error): string; | ||
|
||
// Warning: (ae-internal-missing-underscore) The name "Notifier" should be prefixed with an underscore because the declaration is marked as @internal | ||
// | ||
// @internal (undocumented) | ||
export interface Notifier { | ||
// (undocumented) | ||
error(message: string): void; | ||
} | ||
|
||
// @public (undocumented) | ||
export type RNG<T = number> = () => T; | ||
|
||
// Warning: (ae-internal-missing-underscore) The name "seedableRNG" should be prefixed with an underscore because the declaration is marked as @internal | ||
// | ||
// @internal | ||
export function seedableRNG(seed: number): RNG<number>; | ||
|
||
// Warning: (ae-forgotten-export) The symbol "Frame" needs to be exported by the entry point index.d.ts | ||
// Warning: (ae-internal-missing-underscore) The name "stack" should be prefixed with an underscore because the declaration is marked as @internal | ||
// | ||
// @internal (undocumented) | ||
export function stack(error: Error): Iterable<Frame>; | ||
|
||
// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "test" because one of its declarations is marked as @internal | ||
// | ||
// @public (undocumented) | ||
export function test<T = number>(name: string, assertion: (assert: Assertions, rng: RNG<T>, seed: number) => void | Promise<void>, controller?: Partial<Controller<T>>): Promise<void>; | ||
|
||
// @internal (undocumented) | ||
export function test<T = number>(name: string, assertion: (assert: Assertions, rng: RNG<T>, seed: number) => void | Promise<void>, notifier: Notifier, controller?: Partial<Controller<T>>): Promise<void>; | ||
|
||
// (No @packageDocumentation comment for this package) | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
"scripts": { | ||
"build": "node --max-old-space-size=8192 scripts/build.mjs --pretty", | ||
"clean": "node scripts/clean.mjs --pretty", | ||
"test": "node scripts/test.mjs --pretty", | ||
"test": "yarn build && vitest run --config ./config/vitest.config.ts", | ||
"watch": "node scripts/watch.mjs --pretty", | ||
"extract": "node scripts/api-extractor.mjs --pretty", | ||
"document": "api-documenter generate -i docs/data/api -o docs/api", | ||
|
@@ -32,15 +32,13 @@ | |
"@microsoft/api-documenter": "^7.19.9", | ||
"@microsoft/api-extractor": "^7.29.5", | ||
"@siteimprove/alfa-toolchain": "workspace:^0.94.1", | ||
"@types/async": "^3.2.20", | ||
"@types/node": "^22.0.0", | ||
"async": "^3.2.1", | ||
"execa": "^9.0.0", | ||
"knip": "^5.23.1", | ||
"minimist": "^1.2.6", | ||
"package-dependency-graph": "^1.14.4", | ||
"prettier": "^3.0.0", | ||
"typescript": "^5.5.2" | ||
"typescript": "^5.5.2", | ||
"vitest": "^2.1.5" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.