MCPcopy Create free account
hub / github.com/chokcoco/iCSS / testQuery

Method testQuery

MCP/test-inspiration.js:76–97  ·  view source on GitHub ↗
(testName, sql)

Source from the content-addressed store, hash-verified

74 }
75
76 testQuery(testName, sql) {
77 return new Promise((resolve, reject) => {
78 this.db.all(sql, (err, rows) => {
79 if (err) {
80 console.error(`❌ ${testName} failed:`, err.message);
81 reject(err);
82 } else {
83 console.log(`✅ ${testName}: ${rows.length} results`);
84 if (rows.length > 0) {
85 console.log(' Sample results:');
86 rows.slice(0, 2).forEach((row, index) => {
87 console.log(` ${index + 1}.`, Object.keys(row).slice(0, 3).map(key =>
88 `${key}: ${String(row[key]).substring(0, 30)}`
89 ).join(', '));
90 });
91 }
92 console.log('');
93 resolve(rows);
94 }
95 });
96 });
97 }
98
99 async testCodeSnippets() {
100 console.log('🔍 Testing code snippets...\n');

Callers 3

testCodeSnippetsMethod · 0.95
testDemoStylesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected