Skip to main content
Glama
logic.test.cjs.snap2.71 kB
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Pattern Matching Logic Tests Empty line extraction 1`] = `"// EMPTY_LINE_MARKER"`; exports[`Pattern Matching Logic Tests Extract arrow function block 1`] = ` "// ARROW_FUNCTIONS_START processArray: (arr) => arr.filter(x => x > 0), formatString: (str) => str.trim().toLowerCase(), calculateSum: (numbers) => numbers.reduce((a, b) => a + b, 0) // ARROW_FUNCTIONS_END" `; exports[`Pattern Matching Logic Tests Extract class definition 1`] = ` "class MyClass { constructor(data) { this.data = data; } process() { return this.data.map(x => x * 2); }" `; exports[`Pattern Matching Logic Tests Extract function with end pattern 1`] = ` "function processData(input) { console.log('Processing:', input); return input.toUpperCase(); }" `; exports[`Pattern Matching Logic Tests Extract multiline block with comments 1`] = ` "/* START_BLOCK */ function complexFunction(a, b, c) { // Complex logic here const result = a + b + c; return result; } /* END_BLOCK */" `; exports[`Pattern Matching Logic Tests Extract single line by pattern 1`] = `"const TARGET_LINE = 'find me';"`; exports[`Pattern Matching Logic Tests Extract with line count 1`] = ` "function test() { const a = 1; const b = 2; " `; exports[`Pattern Matching Logic Tests Extract with special characters and regex patterns 1`] = ` "// SPECIAL_PATTERN: \${}[]^.*+?|() const config = { pattern: "*.{js,ts,jsx,tsx}"," `; exports[`Pattern Matching Logic Tests Insert after marker 1`] = ` "class Test { // Insert utilities here function added() {} mainMethod() { return true; } }" `; exports[`Pattern Matching Logic Tests Insert before first line 1`] = ` "// Added header comment function existing() { return true; }" `; exports[`Pattern Matching Logic Tests Insert complex content after marker 1`] = ` "class Service { // INJECT_METHODS_HERE async fetchData(url) { try { const response = await fetch(url); return await response.json(); } catch (error) { throw new Error(\`Fetch failed: \${error.message}\`); } } validateData(data) { if (!data || typeof data !== 'object') { return false; } return Object.keys(data).length > 0; } existing() { return 'exists'; } }" `; exports[`Pattern Matching Logic Tests Replace marker 1`] = ` "class Test { function newMethod() { return true; } existingMethod() { return false; } }" `; exports[`Pattern Matching Logic Tests Replace nested content 1`] = ` "function wrapper() { const new = 'added this'; const also = 'and this too'; const old = 'remove this'; // END_REPLACE return 'keep this'; }" `;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/witqq/clipboard-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server