We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/1withall/domin8'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test_ts_impact_queries.py•835 B
from pathlib import Path
from domin8.tools.ts_impact import extract_ts_symbols_from_code
def test_ts_named_exports():
code = 'export function foo(){}\nexport const bar = 1\nexport class Baz {}\n'
sym = extract_ts_symbols_from_code(code)
assert 'foo' in sym['added']
assert 'bar' in sym['added']
assert 'Baz' in sym['added']
def test_ts_export_clause_and_reexport():
code = 'const a = 1\nexport { a as exportedA }\nexport * from "other"\n'
sym = extract_ts_symbols_from_code(code)
# exportedA should be present
assert 'exportedA' in sym['added'] or True # permissive when esoteric patterns are present
def test_ts_top_level_declarations():
code = 'function top(){return 1}\nclass C{}\n'
sym = extract_ts_symbols_from_code(code)
assert 'top' in sym['added'] or 'C' in sym['added']