@itmetsam/samurai-framework 0.22.7 → 0.22.8

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.
@@ -38,6 +38,14 @@ export interface FoundTest {
38
38
  }[];
39
39
  /** The names of the outputs the test declares; absent when it declares none */
40
40
  outputs?: string[];
41
+ /**
42
+ * The annotations the test declares with `annotations: [...]`, in declaration order (e.g. the `plan` annotation
43
+ * `{ type: "plan", description: "plans/x.plan.md" }`); absent when it declares none
44
+ */
45
+ annotations?: {
46
+ type: string;
47
+ description?: string;
48
+ }[];
41
49
  }
42
50
  /**
43
51
  * Imports the project's specs without running anything and lists the tests the options select, each with the id
@@ -45,7 +45,7 @@ export async function listTests(options = {}) {
45
45
  return inProject(options, async (runner) => {
46
46
  const { tests, srcDir } = await runner.list();
47
47
  return tests.map((test) => {
48
- const { name, file, modifier, reason, inputs, outputs } = test;
48
+ const { name, file, modifier, reason, inputs, outputs, annotations } = test;
49
49
  const relativeFile = toPosix(path.relative(srcDir, file));
50
50
  return {
51
51
  id: testId(relativeFile, name),
@@ -61,6 +61,7 @@ export async function listTests(options = {}) {
61
61
  })),
62
62
  }),
63
63
  ...(outputs && { outputs }),
64
+ ...(annotations && { annotations }),
64
65
  };
65
66
  });
66
67
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itmetsam/samurai-framework",
3
- "version": "0.22.7",
3
+ "version": "0.22.8",
4
4
  "description": "Browser test framework over WebDriver BiDi: auto-waiting locators, environments and secrets, a recorder, and a command line.",
5
5
  "main": "dist/api.js",
6
6
  "exports": {