feat: improve changes issues positions #156
ci.yml
on: pull_request
Lint & Format
29s
Test & Coverage
37s
Annotations
5 errors, 1 warning, and 2 notices
|
Test & Coverage
Process completed with exit code 1.
|
|
should report an issue if version is not a mapping:
src/linter/rules/__tests__/invalid-change-version.test.mjs#L317
[Error [ERR_TEST_FAILURE]: Expected values to be strictly deep-equal:
+ actual - expected
[
{
level: 'error',
+ message: 'Invalid change property type: undefined',
- message: 'Invalid change property type: PLAIN',
position: {
end: {
line: 8
},
start: {
] {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
[
{
level: 'error',
+ message: 'Invalid change property type: undefined',
- message: 'Invalid change property type: PLAIN',
position: {
end: {
line: 8
},
start: {
at TestContext.<anonymous> (file:///home/runner/work/api-docs-tooling/api-docs-tooling/src/linter/rules/__tests__/invalid-change-version.test.mjs:317:5)
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: [ [Object] ],
expected: [ [Object] ],
operator: 'deepStrictEqual'
}
}
|
|
should report an issue if changes is not a sequence:
src/linter/rules/__tests__/invalid-change-version.test.mjs#L275
[Error [ERR_TEST_FAILURE]: Expected values to be strictly deep-equal:
+ actual - expected
[
{
level: 'error',
+ message: 'Invalid change property type: undefined',
- message: 'Invalid change property type: PLAIN',
position: {
end: {
line: 8
},
start: {
] {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
[
{
level: 'error',
+ message: 'Invalid change property type: undefined',
- message: 'Invalid change property type: PLAIN',
position: {
end: {
line: 8
},
start: {
at TestContext.<anonymous> (file:///home/runner/work/api-docs-tooling/api-docs-tooling/src/linter/rules/__tests__/invalid-change-version.test.mjs:275:5)
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: [ [Object] ],
expected: [ [Object] ],
operator: 'deepStrictEqual'
}
}
|
|
should report an issue if a change version is missing:
src/linter/rules/__tests__/invalid-change-version.test.mjs#L68
Error [ERR_TEST_FAILURE]: Cannot read properties of null (reading 'filter')
at async Promise.all (index 0) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of null (reading 'filter')
at file:///home/runner/work/api-docs-tooling/api-docs-tooling/src/linter/rules/invalid-change-version.mjs:138:9
at Array.forEach (<anonymous>)
at file:///home/runner/work/api-docs-tooling/api-docs-tooling/src/linter/rules/invalid-change-version.mjs:136:29
at overload (file:///home/runner/work/api-docs-tooling/api-docs-tooling/node_modules/unist-util-visit/lib/index.js:311:12)
at node (html) (file:///home/runner/work/api-docs-tooling/api-docs-tooling/node_modules/unist-util-visit-parents/lib/index.js:346:27)
at node (root) (file:///home/runner/work/api-docs-tooling/api-docs-tooling/node_modules/unist-util-visit-parents/lib/index.js:363:61)
at visitParents (file:///home/runner/work/api-docs-tooling/api-docs-tooling/node_modules/unist-util-visit-parents/lib/index.js:304:31)
at visit (file:///home/runner/work/api-docs-tooling/api-docs-tooling/node_modules/unist-util-visit/lib/index.js:302:3)
at invalidChangeVersion (file:///home/runner/work/api-docs-tooling/api-docs-tooling/src/linter/rules/invalid-change-version.mjs:101:3)
at TestContext.<anonymous> (file:///home/runner/work/api-docs-tooling/api-docs-tooling/src/linter/rules/__tests__/invalid-change-version.test.mjs:68:5)
}
|
|
Test & Coverage:
doc/api/test.md#L1
This is a ERROR issue
|
|
Test & Coverage:
doc/api/test.md#L1
This is a WARN issue
|
|
Test & Coverage
Total Tests: 130
Suites 📂: 47
Passed ✅: 127
Failed ❌: 3
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 2246.703ms
|
|
Test & Coverage:
doc/api/test.md#L1
This is a INFO issue
|