@reticlehq/test 2.8.0 → 2.9.0

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.
Files changed (2) hide show
  1. package/dist/types.d.ts +14 -5
  2. package/package.json +3 -3
package/dist/types.d.ts CHANGED
@@ -1,12 +1,21 @@
1
1
  import type { ToolInvoker } from '@reticlehq/server';
2
+ import type { TestContext } from './test-context.js';
2
3
  import type { TestStatus } from './constants.js';
3
4
  /**
4
- * The per-spec `t` handed to a spec body. Defined by the MATCHERS facet (out of scope here);
5
- * the RUNNER treats it as opaque except for the skip protocol it raises (see skip.ts).
5
+ * The per-spec `t` handed to a spec body.
6
+ *
7
+ * This used to declare only `invoke`, on the reasoning that the RUNNER treats `t` as opaque and
8
+ * should stay decoupled from the matchers. That is true of the runner and false of the caller: the
9
+ * thing actually handed to a spec is a `TestContext`, and `reticleTest` is a public export. So
10
+ * every TypeScript spec written against the documented API failed to compile on its first matcher —
11
+ * `Property 'expectText' does not exist on type 'SpecContext'` — while the same spec ran correctly.
12
+ * Nothing caught it because this repo's own spec is `.mjs`, which type-checks none of it.
13
+ *
14
+ * The runner's decoupling is preserved by `ContextFactory` below: the runner still never builds a
15
+ * context, it only calls the one it is given. What it does not get to do any more is describe that
16
+ * context to the outside world as less than it is.
6
17
  */
7
- export interface SpecContext {
8
- readonly invoke: ToolInvoker;
9
- }
18
+ export type SpecContext = TestContext;
10
19
  export type SpecFn = (t: SpecContext) => void | Promise<void>;
11
20
  export interface ReticleSpec {
12
21
  readonly name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reticlehq/test",
3
- "version": "2.8.0",
3
+ "version": "2.9.0",
4
4
  "description": "Reticle test runner: reticleTest spec registry + a runner that drives Reticle tools without MCP/stdio.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -12,8 +12,8 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "@reticlehq/core": "2.8.0",
16
- "@reticlehq/server": "2.8.0"
15
+ "@reticlehq/core": "2.9.0",
16
+ "@reticlehq/server": "2.9.0"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "vitest": "^3.2.6"