feat: json, json-all generators #658
ci.yml
on: pull_request
Lint & Format
34s
Test & Coverage
36s
Annotations
8 errors and 1 notice
|
Lint & Format
Process completed with exit code 1.
|
|
Test & Coverage
Process completed with exit code 1.
|
|
determines mutability:
src/generators/json/utils/sections/__tests__/property.test.mjs#L625
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
- description: 'asd1234 [asd](https://some-link) **Default:** `8192`',
mutable: true
}
at TestContext.<anonymous> (file:///home/runner/work/doc-kit/doc-kit/src/generators/json/utils/sections/__tests__/property.test.mjs:625:12)
at Test.runInAsyncScope (node:async_hooks:214:14)
at Test.run (node:internal/test_runner/test:1047:25)
at Suite.processPendingSubtests (node:internal/test_runner/test:744:18)
at Test.postRun (node:internal/test_runner/test:1173:19)
at Test.run (node:internal/test_runner/test:1101:12)
at async Suite.processPendingSubtests (node:internal/test_runner/test:744:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { mutable: true },
expected: { description: 'asd1234 [asd](https://some-link) **Default:** `8192`', mutable: true },
operator: 'deepStrictEqual',
diff: 'simple'
}
|
|
parses descriptions:
src/generators/json/utils/sections/__tests__/property.test.mjs#L577
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
+ {}
- {
- description: 'asd1234 [asd](https://some-link)'
- }
at TestContext.<anonymous> (file:///home/runner/work/doc-kit/doc-kit/src/generators/json/utils/sections/__tests__/property.test.mjs:577:12)
at Test.runInAsyncScope (node:async_hooks:214:14)
at Test.run (node:internal/test_runner/test:1047:25)
at Suite.processPendingSubtests (node:internal/test_runner/test:744:18)
at Test.postRun (node:internal/test_runner/test:1173:19)
at Test.run (node:internal/test_runner/test:1101:12)
at async Promise.all (index 0)
at async Suite.run (node:internal/test_runner/test:1442:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:744:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: {},
expected: { description: 'asd1234 [asd](https://some-link)' },
operator: 'deepStrictEqual',
diff: 'simple'
}
|
|
|
|
empty `text` section:
src/generators/json/utils/sections/__tests__/index.test.mjs#L87
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
+ '$schema': 'https://nodejs.org/docs/v22.21.1/api/node-doc-schema.json',
- '$schema': 'https://nodejs.org//docs/v22.21.1/api/node-doc-schema.json',
'@name': 'Some title',
+ parent: undefined,
source: 'doc/api/something.md',
type: 'text'
}
at TestContext.<anonymous> (file:///home/runner/work/doc-kit/doc-kit/src/generators/json/utils/sections/__tests__/index.test.mjs:87:10)
at Test.runInAsyncScope (node:async_hooks:214:14)
at Test.run (node:internal/test_runner/test:1047:25)
at Test.processPendingSubtests (node:internal/test_runner/test:744:18)
at Test.postRun (node:internal/test_runner/test:1173:19)
at Test.run (node:internal/test_runner/test:1101:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:296:3) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { '$schema': 'https://nodejs.org/docs/v22.21.1/api/node-doc-schema.json', source: 'doc/api/something.md', type: 'text', '@name': 'Some title', parent: undefined },
expected: { '$schema': 'https://nodejs.org//docs/v22.21.1/api/node-doc-schema.json', source: 'doc/api/something.md', type: 'text', '@name': 'Some title' },
operator: 'deepStrictEqual',
diff: 'simple'
}
|
|
empty `module` section:
src/generators/json/utils/sections/__tests__/index.test.mjs#L43
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
+ '$schema': 'https://nodejs.org/docs/v22.21.1/api/node-doc-schema.json',
- '$schema': 'https://nodejs.org//docs/v22.21.1/api/node-doc-schema.json',
'@module': 'node:bla',
'@name': 'Some title',
+ '@see': 'https://nodejs.org/docs/v22.21.1/api/bla.html',
+ parent: undefined,
- '@see': 'https://nodejs.org//docs/v22.21.1/api/bla.html',
source: 'doc/api/something.md',
type: 'module'
}
at TestContext.<anonymous> (file:///home/runner/work/doc-kit/doc-kit/src/generators/json/utils/sections/__tests__/index.test.mjs:43:10)
at Test.runInAsyncScope (node:async_hooks:214:14)
at Test.run (node:internal/test_runner/test:1047:25)
at Test.start (node:internal/test_runner/test:944:17)
at startSubtestAfterBootstrap (node:internal/test_runner/harness:296:17) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { '$schema': 'https://nodejs.org/docs/v22.21.1/api/node-doc-schema.json', source: 'doc/api/something.md', type: 'module', '@name': 'Some title', parent: undefined, '@see': 'https://nodejs.org/docs/v22.21.1/api/bla.html', '@module': 'node:bla' },
expected: { '$schema': 'https://nodejs.org//docs/v22.21.1/api/node-doc-schema.json', source: 'doc/api/something.md', '@module': 'node:bla', '@see': 'https://nodejs.org//docs/v22.21.1/api/bla.html', type: 'module', '@name': 'Some title' },
operator: 'deepStrictEqual',
diff: 'simple'
}
|
|
description with `inlineCode`:
src/generators/json/utils/sections/__tests__/base.test.mjs#L244
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
actual expected
'hello `world`\nasd'
at TestContext.<anonymous> (file:///home/runner/work/doc-kit/doc-kit/src/generators/json/utils/sections/__tests__/base.test.mjs:244:12)
at Test.runInAsyncScope (node:async_hooks:214:14)
at Test.run (node:internal/test_runner/test:1047:25)
at Suite.processPendingSubtests (node:internal/test_runner/test:744:18)
at Test.postRun (node:internal/test_runner/test:1173:19)
at Test.run (node:internal/test_runner/test:1101:12)
at async Promise.all (index 0)
at async Suite.run (node:internal/test_runner/test:1442:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:744:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'hello`world`\nasd',
expected: 'hello `world`\nasd',
operator: 'strictEqual',
diff: 'simple'
}
|
|
Test & Coverage
Total Tests: 277
Suites 📂: 80
Passed ✅: 271
Failed ❌: 6
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 4278.789ms
|