@test-station/plugin-source-analysis 0.1.0 → 0.1.5
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.
- package/README.md +31 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @test-station/plugin-source-analysis
|
|
2
|
+
|
|
3
|
+
Source-analysis enrichment plugin for Test Station.
|
|
4
|
+
|
|
5
|
+
Most consumers should install `@test-station/cli` or `@test-station/core` instead of this package directly. The default core bundle already includes this plugin. Install this package only when you want to import and register the plugin yourself.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install --save-dev @test-station/plugin-source-analysis
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## What It Does
|
|
14
|
+
|
|
15
|
+
- parses JavaScript test files with Acorn
|
|
16
|
+
- enriches normalized test results with assertions, setup hooks, mocks, and source snippets
|
|
17
|
+
- supports shared setup and shared mock extraction
|
|
18
|
+
|
|
19
|
+
## Direct Use
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import { createSourceAnalysisPlugin } from '@test-station/plugin-source-analysis';
|
|
23
|
+
|
|
24
|
+
const plugin = createSourceAnalysisPlugin({
|
|
25
|
+
includeSharedSetup: true,
|
|
26
|
+
includeSharedMocks: true,
|
|
27
|
+
includeSourceSnippet: true,
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Register the plugin through `plugins` in `test-station.config.mjs` or through a custom programmatic pipeline.
|