Skip to content

Fix issues with enum options filtering logic in enum_ function #1795

Fix issues with enum options filtering logic in enum_ function

Fix issues with enum options filtering logic in enum_ function #1795

Triggered via pull request January 4, 2025 21:00
Status Failure
Total duration 1m 16s
Artifacts

ci.yml

on: pull_request
Install packages
22s
Install packages
Build and publish library
35s
Build and publish library
Run Prettier in library
32s
Run Prettier in library
Run ESLint in library
36s
Run ESLint in library
Run Vitest in library
35s
Run Vitest in library
Run Prettier in packages/to-json-schema
20s
Run Prettier in packages/to-json-schema
Run ESLint in packages/to-json-schema
28s
Run ESLint in packages/to-json-schema
Run Vitest in packages/to-json-schema
20s
Run Vitest in packages/to-json-schema
Run Prettier in website
38s
Run Prettier in website
Run ESLint in website
26s
Run ESLint in website
Fit to window
Zoom out
Zoom in

Annotations

8 errors and 10 warnings
src/schemas/enum/enum.test.ts > enum_ > should return schema object for enum like object > with undefined message: library/src/schemas/enum/enum.test.ts#L87
AssertionError: expected { kind: 'schema', type: 'enum', …(8) } to strictly equal { kind: 'schema', type: 'enum', …(8) } - Expected + Received Object { "async": false, "enum": Object { "1": "foo", "1.7976931348623157e+308": "bar", "1.7976931348623157e308": "baz", "5e-324": "qux", "Infinity": "Infinity", "NaN": "NaN", }, - "expects": "\"baz\"", + "expects": "(\"foo\" | \"bar\" | \"baz\" | \"qux\" | \"NaN\" | \"Infinity\")", "kind": "schema", "message": undefined, "options": Array [ + "foo", + "bar", "baz", + "qux", + "NaN", + "Infinity", ], "reference": [Function enum_], "type": "enum", "~run": Any<Function>, "~standard": Object { "validate": Any<Function>, "vendor": "valibot", "version": 1, }, } ❯ src/schemas/enum/enum.test.ts:87:37
src/schemas/enum/enum.test.ts > enum_ > should return schema object for enum like object > with string message: library/src/schemas/enum/enum.test.ts#L92
AssertionError: expected { kind: 'schema', type: 'enum', …(8) } to strictly equal { kind: 'schema', type: 'enum', …(8) } - Expected + Received Object { "async": false, "enum": Object { "1": "foo", "1.7976931348623157e+308": "bar", "1.7976931348623157e308": "baz", "5e-324": "qux", "Infinity": "Infinity", "NaN": "NaN", }, - "expects": "\"baz\"", + "expects": "(\"foo\" | \"bar\" | \"baz\" | \"qux\" | \"NaN\" | \"Infinity\")", "kind": "schema", "message": "message", "options": Array [ + "foo", + "bar", "baz", + "qux", + "NaN", + "Infinity", ], "reference": [Function enum_], "type": "enum", "~run": Any<Function>, "~standard": Object { "validate": Any<Function>, "vendor": "valibot", "version": 1, }, } ❯ src/schemas/enum/enum.test.ts:92:48
src/schemas/enum/enum.test.ts > enum_ > should return schema object for enum like object > with function message: library/src/schemas/enum/enum.test.ts#L100
AssertionError: expected { kind: 'schema', type: 'enum', …(8) } to strictly equal { kind: 'schema', type: 'enum', …(8) } - Expected + Received Object { "async": false, "enum": Object { "1": "foo", "1.7976931348623157e+308": "bar", "1.7976931348623157e308": "baz", "5e-324": "qux", "Infinity": "Infinity", "NaN": "NaN", }, - "expects": "\"baz\"", + "expects": "(\"foo\" | \"bar\" | \"baz\" | \"qux\" | \"NaN\" | \"Infinity\")", "kind": "schema", "message": [Function message], "options": Array [ + "foo", + "bar", "baz", + "qux", + "NaN", + "Infinity", ], "reference": [Function enum_], "type": "enum", "~run": Any<Function>, "~standard": Object { "validate": Any<Function>, "vendor": "valibot", "version": 1, }, } ❯ src/schemas/enum/enum.test.ts:100:46
src/schemas/enum/enum.test.ts > enum_ > should return dataset with issues for enum like object > for invalid options: library/src/vitest/expectSchemaIssue.ts#L27
AssertionError: expected { value: 'foo', typed: true } to strictly equal { typed: false, value: 'foo', …(1) } - Expected + Received Object { - "issues": Array [ - Object { - "abortEarly": undefined, - "abortPipeEarly": undefined, - "expected": "\"baz\"", - "input": "foo", - "issues": undefined, - "kind": "schema", - "lang": undefined, - "message": "message", - "path": undefined, - "received": "\"foo\"", - "requirement": undefined, - "type": "enum", - }, - ], - "typed": false, + "typed": true, "value": "foo", } ❯ Module.expectSchemaIssue src/vitest/expectSchemaIssue.ts:27:43 ❯ src/schemas/enum/enum.test.ts:213:7
Run Vitest in library
Process completed with exit code 1.
Run ESLint in library: library/src/schemas/enum/enum.test-d.ts#L21
'enumLikeObject' is assigned a value but only used as a type
Run ESLint in library: library/src/schemas/enum/enum.test-d.ts#L80
Expected an assignment or function call and instead saw an expression
Run ESLint in library
Process completed with exit code 1.
Install packages
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run Vitest in packages/to-json-schema
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run Prettier in packages/to-json-schema
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run ESLint in website
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run ESLint in packages/to-json-schema
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run Prettier in library
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Build and publish library
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run Vitest in library
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run ESLint in library
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run Prettier in website
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636