MCPcopy Create free account
hub / github.com/dawsbot/drain / exampleTesting

Function exampleTesting

src/__tests__/moralis-client.example.ts:80–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78
79// Example: Testing with mock client
80async function exampleTesting() {
81 const mockClient = new MockMoralisClient();
82
83 const result = await mockClient.fetchTokens(1, '0x123...', []);
84
85 console.assert(result.erc20s.length === 1, 'Should return 1 token');
86 console.assert(
87 result.erc20s[0].contract_ticker_symbol === 'USDC',
88 'Should be USDC',
89 );
90
91 console.log('Mock test passed!');
92
93 return result;
94}
95
96// Export examples
97export { exampleUsage, exampleTesting, MockMoralisClient };

Callers

nothing calls this directly

Calls 1

fetchTokensMethod · 0.95

Tested by

no test coverage detected