Skip to Content
What’s NewTSTyche 5

Release Notes

This page lists breaking changes and notable new features. Please be sure to read the release notes before upgrading from a previous version.

The detailed changelog can be found in TSTyche repository on GitHub .

TSTyche 5.0

TSTyche 5.0 ships with the new // @tstyche fixme comment directive and checkDeclarationFiles configuration option.

Requirements

Breaking! The minimum supported Node.js version is 20.12. It is recommended to use the latest LTS release .

TypeScript Versions

Breaking! Support for TypeScript 4.x is dropped.

expect()

Breaking! The .fail run mode flag is removed. Use the new // @tstyche fixme comment directive instead.

Matchers

Breaking! The .toBeAssignableWith() matcher is renamed to .toBeAssignableFrom().

import { expect } from "tstyche"; - expect<Awaitable<string>>().type.toBeAssignableWith("abc"); + expect<Awaitable<string>>().type.toBeAssignableFrom("abc"); - expect<Awaitable<string>>().type.not.toBeAssignableWith(123); + expect<Awaitable<string>>().type.not.toBeAssignableFrom(123);

Comment Directives

// @tstyche fixme

Marks an expect(), test() or describe() as failing.

import { , } from "tstyche"; declare function (: () => unknown): void; declare function (: () => <unknown>): <void>; ((() => {}))..<void>(); // @tstyche fixme -- This should work, see: #265 ((() => .()))..<<void>>(); ("() => unknown", () => { ((() => {}))..<void>(); }); // @tstyche fixme -- Known bug, see: #345 ("() => Promise<unknown>", () => { ((() => .()))..<<void>>(); });

The runner behaves as follows:

  • when an expect() is marked, verify that it actually fails
  • when a test() or describe() is marked, verify that it has at least one failing child

Configuration

Breaking! The checkSourceFiles configuration option is removed.

checkDeclarationFiles

Check declaration files for type errors.

When checkDeclarationFiles is enabled, all the .d.ts files in the project (not including files from the node_modules directories) are checked for type errors.

If type declarations in the project are already checked by tsc, this option can be disabled to improve performance. When checkDeclarationFiles is disabled, only test and fixture files are checked.

checkSuppressedErrors

The checkSuppressedErrors configuration option is enabled by default.

target

Breaking! The option value now must be a string in semver syntax:

- "target": [">=5.2 <=5.3", "5.4.2", ">5.5"] + "target": ">=5.2 <=5.3 || 5.4.2 || >5.5"

The default value is changed to "*". When TypeScript is installed, it will use that version; otherwise, the latest version will be used.

The "current" value is not supported anymore. Use "*" instead.

Command Line

--target

Breaking! The option value now must be a single string with version ranges separated by ||:

- --target '>=5.2 <5.3, 5.4.2, >5.5' + --target '>=5.2 <=5.3 || 5.4.2 || >5.5'

The default value is changed to "*". When TypeScript is installed, it will use that version; otherwise, the latest version will be used.

The "current" value is not supported anymore. Use "*" instead.

Last updated on