@virmator/plugin-testing 14.32.1 → 14.33.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.
@@ -15,7 +15,7 @@ export const typeDocConfig: Partial<TypeDocOptions> = {
15
15
  intentionallyNotExported: [],
16
16
  defaultCategory: 'MISSING CATEGORY',
17
17
  categoryOrder: [
18
- 'Main',
18
+ 'Testing',
19
19
  'Internal',
20
20
  ],
21
21
  };
@@ -2,9 +2,17 @@ import { LogOutputType, type MaybePromise, type PartialWithUndefined } from '@au
2
2
  import { type DirContents } from '@augment-vir/node';
3
3
  import { type UniversalTestContext } from '@augment-vir/test';
4
4
  import { type VirmatorPlugin } from '@virmator/core';
5
- /** Log string transformer. */
5
+ /**
6
+ * Log string transformer.
7
+ *
8
+ * @category Testing
9
+ */
6
10
  export type LogTransform = (logType: LogOutputType, arg: string) => string;
7
- /** Results of a plugin test. */
11
+ /**
12
+ * Results of a plugin test.
13
+ *
14
+ * @category Testing
15
+ */
8
16
  export type TestPluginResult = {
9
17
  /**
10
18
  * The logs of the plugin execution. Note that this won't catch _all_ logs, as some logged
@@ -18,7 +26,11 @@ export type TestPluginResult = {
18
26
  /** Any error that was thrown by the plugin execution. */
19
27
  error?: Error;
20
28
  };
21
- /** Optional options for {@link testPlugin}. */
29
+ /**
30
+ * Optional options for {@link testPlugin}.
31
+ *
32
+ * @category Testing
33
+ */
22
34
  export type TestPluginOptions = PartialWithUndefined<{
23
35
  /** Transforms the final log string output of a plugin's command. */
24
36
  logTransform: LogTransform;
@@ -27,7 +39,11 @@ export type TestPluginOptions = PartialWithUndefined<{
27
39
  /** Execute a command before the test directory is cleaned up. */
28
40
  beforeCleanupCallback: (cwd: string) => MaybePromise<void>;
29
41
  }>;
30
- /** Tests a virmator plugin and saves a snapshot of the results. */
42
+ /**
43
+ * Tests a virmator plugin and saves a snapshot of the results.
44
+ *
45
+ * @category Testing
46
+ */
31
47
  export declare function testPlugin({ shouldPass, context, plugin, cliCommand, cwd, options, }: Readonly<{
32
48
  shouldPass: boolean;
33
49
  context: UniversalTestContext;
@@ -28,7 +28,11 @@ const defaultContentsExcludeList = [
28
28
  }),
29
29
  ];
30
30
  const defaultLogTransform = (logType, arg) => arg;
31
- /** Tests a virmator plugin and saves a snapshot of the results. */
31
+ /**
32
+ * Tests a virmator plugin and saves a snapshot of the results.
33
+ *
34
+ * @category Testing
35
+ */
32
36
  export async function testPlugin({ shouldPass, context, plugin, cliCommand, cwd, options = {}, }) {
33
37
  assertTestContext(context, TestEnv.Node);
34
38
  const logs = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virmator/plugin-testing",
3
- "version": "14.32.1",
3
+ "version": "14.33.0",
4
4
  "description": "Testing for virmator plugins.",
5
5
  "keywords": [
6
6
  "virmator",
@@ -35,7 +35,7 @@
35
35
  "@augment-vir/common": "^32.2.3",
36
36
  "@augment-vir/node": "^32.2.3",
37
37
  "@augment-vir/test": "^32.2.3",
38
- "@virmator/core": "^14.32.1"
38
+ "@virmator/core": "^14.33.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/node": "^26.2.0",