Gallery of matchers based on NodeJS.

To install them at runtime, you'll need this reference in Vitest's configuration file:

test: {
setupFiles: ["@giancosta86/rigoletto/matchers/nodejs"]
}

To access them via TypeScript, just add this line to some global .d.ts file included by tsconfig.json:

import "@giancosta86/rigoletto/matchers/nodejs";
interface NodeJsMatchers {
    toExistInFileSystem: () => void;
}

Matchers

toExistInFileSystem: () => void

Asserts that a path exists in the file system.

expect("/etc/passwd").toExistInFileSystem()