MCPcopy Create free account
hub / github.com/github/gh-aw / assertContains

Function assertContains

scripts/generate-schema-docs.test.js:27–35  ·  view source on GitHub ↗

* Test helper to check if output contains expected content

(content, expected, testName)

Source from the content-addressed store, hash-verified

25 * Test helper to check if output contains expected content
26 */
27function assertContains(content, expected, testName) {
28 if (!content.includes(expected)) {
29 console.error(`❌ FAIL: ${testName}`);
30 console.error(` Expected to find: "${expected}"`);
31 return false;
32 }
33 console.log(`✓ PASS: ${testName}`);
34 return true;
35}
36
37/**
38 * Test helper to check if output does NOT contain unexpected content

Callers 1

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected