Skip to content

assertFileIncludes

Assert that a file includes a given substring.

import { assertFileIncludes } from "@kensio/smartass";
const filePath = "README.md";
assertFileIncludes(filePath, "Installation");
// This validates file contents at runtime without changing the path type.

Source file: src/assert/file-includes/file-includes.assert.ts