You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,8 @@ All packages are validated via ESLint with a consistent set of rules as well as
40
40
41
41
All packages support testing via `vitest`. Tests are authored with the `.test.ts` suffix and tests can be run with `npm run test`.
42
42
43
+
Snapshot tests will fail if the number of files generated or the contents of the files change. If snapshot changes are expected, you can update them by running: `npm run test:update`
44
+
43
45
## Contributing
44
46
45
47
See [Contributing.md](./CONTRIBUTING.md) for details on contributions
Copy file name to clipboardExpand all lines: tools/api-docs-generator-test-snapshots/README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,3 +3,12 @@
3
3
This package contains vitest snapshots for various @minecraft/api-docs-generator scenarios, processing different configurations of Minecraft API metadata with different combinations of markup generator outputs.
4
4
5
5
It exists as a separate package in order to import both @minecraft/api-docs-generator and the @minecraft/markup-generators-plugin packages and test them together.
6
+
7
+
## Testing
8
+
9
+
This package is validated with a series of vitest snapshot tests that validate generated markup for specific scenarios. When making changes to the generator, please add new scenarios or update the existing scenarios.
10
+
11
+
Snapshot tests will fail if the number of files generated or the contents of the files change. If snapshot changes are expected, you can update them by running: `npm run test:update` at the root of the repository.
12
+
13
+
It is possible to run specific tests using `npm run test -- -- --test <name>`, where `<name>` is a pattern matching `.test.ts`/`.spec.ts`file names. Running this in the JavaScript Debug Terminal allows for debugging specific tests (see above).
Copy file name to clipboardExpand all lines: tools/api-docs-generator/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ We recommend using Visual Studio Code's [JavaScript Debug Terminal](https://code
86
86
87
87
This package is validated with a series of vitest snapshot tests that validate generated markup for specific scenarios. When making changes to the generator, please add new scenarios or update the existing scenarios.
88
88
89
-
Snapshot tests will fail if the number of files generated or the contents of the files change. If snapshot changes are expected, you can update them by running: `npm run test:update`
89
+
Snapshot tests will fail if the number of files generated or the contents of the files change. If snapshot changes are expected, you can update them by running: `npm run test:update` at the root of the repository.
90
90
91
91
It is possible to run specific tests using `npm run test -- -- --test <name>`, where `<name>` is a pattern matching `.test.ts`/`.spec.ts`file names. Running this in the JavaScript Debug Terminal allows for debugging specific tests (see above).
0 commit comments