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

Function assertContains

scripts/generate-agent-factory.test.js:26–34  ·  view source on GitHub ↗

* Test helper to check if output contains expected content

(content, expected, testName)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected