Skip to content

Commit b9526bf

Browse files
committed
README typo fixes and improvements
1 parent c65cda0 commit b9526bf

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ By default, it will track coverage for any file with a `*.schema.json`,
5252
`*.schema.yaml`, or `*.schema.yml` extension. You can change this with the
5353
`include` option. For example, if you keep your schemas in a folder called
5454
`schemas` and they just have plain extensions (`*.json`) instead of schema
55-
extensions `*.schema.json`, you could use `["schemas/**/*.json"]`.
55+
extensions (`*.schema.json`), you could use `["schemas/**/*.json"]`.
5656

5757
If you use custom keywords, vocabularies, and dialects, you'll need to
5858
register them with a [globalSetup](https://vitest.dev/config/#globalsetup)
@@ -105,6 +105,7 @@ for the validation to work.
105105

106106
```JavaScript
107107
import { describe, expect, test } from "vitest";
108+
import { registerSchema, unregisterSchema } from "@hyperjump/json-schema-coverage/vitest";
108109

109110
describe("Worksheet", () => {
110111
beforeEach(async () => {
@@ -127,7 +128,7 @@ describe("Worksheet", () => {
127128
});
128129
```
129130

130-
You can also use the matcher with inline schemas, but you only get coverage for
131+
You can also use the matchers with inline schemas, but you only get coverage for
131132
schemas from files in your code base.
132133

133134
```JavaScript
@@ -228,16 +229,17 @@ example of how to use the evaluation plugin.
228229
### Nyc Example
229230

230231
The following is an example of using the Low-Level API to generate coverage
231-
without Vitest. This uses the [nyc] CLI to generate reports from the coverage
232-
files that are generated. Once you run the script, you can run the following
233-
command to generate a report.
232+
without Vitest. This uses [istanbul]'s [nyc] CLI to generate reports from the
233+
coverage files that are generated.
234234

235235
Keep in mind that with the Low-Level API approach, you need to configure
236236
[@hyperjump/json-schema] yourself. That means that you need to import the
237237
dialects you need and will need to provide `MediaTypePlugin`s for anything other
238238
than `*.schema.json` file extension support. YAML support is only provided
239239
out-of-the-box for the Vitest integration.
240240

241+
Once you run the script, you can run the following command to generate a report.
242+
241243
```bash
242244
npx nyc report --extension .schema.json
243245
```

0 commit comments

Comments
 (0)