Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182/** Tests for the configuration error classes. @module */
import { describe, expect, it,} from '@monochromatic-dev/module-test/ts';
import { InvalidConcurrencyError, InvalidRejectOnClearError,} from '../dist/final/neutral/index.mjs';
await describe({ name: '', children: [ describe({ name: InvalidConcurrencyError.name, children: [ it({ name: 'extends TypeError so existing TypeError handlers keep working', fn: async () => { const error = new InvalidConcurrencyError(); expect(error,).toBeInstanceOf(TypeError,); expect(error,).toBeInstanceOf(Error,); }, },),
it({ name: 'carries upstream p-limit message text', fn: async () => { const error = new InvalidConcurrencyError(); expect(error.message,).toBe('Expected `concurrency` to be a number from 1 and up',); }, },),
it({ name: 'names itself for readable stacks', fn: async () => { const error = new InvalidConcurrencyError(); expect(error.name,).toBe('InvalidConcurrencyError',); }, },), ], },),
describe({ name: InvalidRejectOnClearError.name, children: [ it({ name: 'extends TypeError so existing TypeError handlers keep working', fn: async () => { const error = new InvalidRejectOnClearError(); expect(error,).toBeInstanceOf(TypeError,); expect(error,).toBeInstanceOf(Error,); }, },),
it({ name: 'carries upstream p-limit message text', fn: async () => { const error = new InvalidRejectOnClearError(); expect(error.message,).toBe('Expected `rejectOnClear` to be a boolean',); }, },),
it({ name: 'names itself for readable stacks', fn: async () => { const error = new InvalidRejectOnClearError(); expect(error.name,).toBe('InvalidRejectOnClearError',); }, },), ], },), ],},);