MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / extractFromSource

Function extractFromSource

test/compute-engine/rubi-translator.test.ts:99–108  ·  view source on GitHub ↗
(src: string)

Source from the content-addressed store, hash-verified

97
98describe('rule extractor', () => {
99 function extractFromSource(src: string) {
100 const dir = mkdtempSync(join(tmpdir(), 'rubi-test-'));
101 const file = join(dir, 'rules.m');
102 writeFileSync(file, src);
103 try {
104 return extractRules(file);
105 } finally {
106 rmSync(dir, { recursive: true, force: true });
107 }
108 }
109
110 test('plain rule with condition', () => {
111 const { rules, errors } = extractFromSource(`

Callers 1

Calls 1

extractRulesFunction · 0.90

Tested by

no test coverage detected