diff options
| author | Shoubhit Dash <[email protected]> | 2026-01-30 21:08:11 +0530 |
|---|---|---|
| committer | Dhravya Shah <[email protected]> | 2026-01-30 21:09:12 -0700 |
| commit | 05ecc18e4f0eef6d3b88b0e459b43ad9f13ce8cf (patch) | |
| tree | 84d930a7fccccff3a6d54295ee8ecec8d0acedb0 /packages/tools/test | |
| parent | done (diff) | |
| download | archived-supermemory-01-30-mastra_integration.tar.xz archived-supermemory-01-30-mastra_integration.zip | |
format and lint01-30-mastra_integration
Diffstat (limited to 'packages/tools/test')
| -rw-r--r-- | packages/tools/test/anthropic-example.ts | 6 | ||||
| -rw-r--r-- | packages/tools/test/claude-memory-examples.ts | 6 | ||||
| -rw-r--r-- | packages/tools/test/claude-memory-real-example.ts | 4 | ||||
| -rw-r--r-- | packages/tools/test/mastra/integration.test.ts | 16 | ||||
| -rw-r--r-- | packages/tools/test/mastra/unit.test.ts | 5 |
5 files changed, 22 insertions, 15 deletions
diff --git a/packages/tools/test/anthropic-example.ts b/packages/tools/test/anthropic-example.ts index cfb82ddb..0da95b77 100644 --- a/packages/tools/test/anthropic-example.ts +++ b/packages/tools/test/anthropic-example.ts @@ -97,7 +97,7 @@ async function chatWithMemoryTool() { if (memoryResult.content) { console.log( "📄 Content preview:", - memoryResult.content.substring(0, 100) + "...", + `${memoryResult.content.substring(0, 100)}...`, ) } } @@ -256,7 +256,7 @@ async function testMemoryOperations() { } else if (result.content) { console.log( "📄 Result:", - result.content.substring(0, 150) + "... (truncated)", + `${result.content.substring(0, 150)}... (truncated)`, ) } } else { @@ -275,7 +275,7 @@ async function testMemoryOperations() { // Run the examples async function main() { await testMemoryOperations() - console.log("\n" + "=".repeat(70) + "\n") + console.log(`\n${"=".repeat(70)}\n`) await chatWithMemoryTool() } diff --git a/packages/tools/test/claude-memory-examples.ts b/packages/tools/test/claude-memory-examples.ts index 6921d151..f37a47fa 100644 --- a/packages/tools/test/claude-memory-examples.ts +++ b/packages/tools/test/claude-memory-examples.ts @@ -314,14 +314,14 @@ export async function runAllExamples() { try { await directFetchExample() - console.log("\\n" + "=".repeat(70) + "\\n") + console.log(`\\n${"=".repeat(70)}\\n`) await anthropicSdkExample() - console.log("\\n" + "=".repeat(70)) + console.log(`\\n${"=".repeat(70)}`) console.log("📋 Real Anthropic SDK Integration Template:") console.log(anthropicIntegrationTemplate) - console.log("\\n" + "=".repeat(70)) + console.log(`\\n${"=".repeat(70)}`) console.log("🔧 cURL Examples for Direct API Testing:") console.log(curlExamples) } catch (error) { diff --git a/packages/tools/test/claude-memory-real-example.ts b/packages/tools/test/claude-memory-real-example.ts index 06ebb546..1124faa8 100644 --- a/packages/tools/test/claude-memory-real-example.ts +++ b/packages/tools/test/claude-memory-real-example.ts @@ -326,7 +326,7 @@ export async function runRealExamples() { // Test with the actual tool call first await testWithRealToolCall() - console.log("\\n" + "=".repeat(70) + "\\n") + console.log(`\\n${"=".repeat(70)}\\n`) // Show web integration example console.log("🌐 Web Framework Integration Example:") @@ -334,7 +334,7 @@ export async function runRealExamples() { // Only run full API example if both keys are present if (process.env.ANTHROPIC_API_KEY && process.env.SUPERMEMORY_API_KEY) { - console.log("\\n" + "=".repeat(70) + "\\n") + console.log(`\\n${"=".repeat(70)}\\n`) await realClaudeMemoryExample() } else { console.log( diff --git a/packages/tools/test/mastra/integration.test.ts b/packages/tools/test/mastra/integration.test.ts index 82c0f168..f33b974e 100644 --- a/packages/tools/test/mastra/integration.test.ts +++ b/packages/tools/test/mastra/integration.test.ts @@ -3,8 +3,11 @@ * Tests processors and wrapper with real Supermemory API calls */ -import { describe, it, expect, vi, beforeEach, afterEach } from "vitest" -import { RequestContext, MASTRA_THREAD_ID_KEY } from "@mastra/core/request-context" +import { describe, it, expect, vi } from "vitest" +import { + RequestContext, + MASTRA_THREAD_ID_KEY, +} from "@mastra/core/request-context" import { SupermemoryInputProcessor, SupermemoryOutputProcessor, @@ -141,7 +144,10 @@ describe.skipIf(!shouldRunIntegration)( const messageList = createIntegrationMessageList() const args: ProcessInputArgs = { messages: [ - createMessage("user", "What are my favorite programming languages?"), + createMessage( + "user", + "What are my favorite programming languages?", + ), ], systemMessages: [], messageList, @@ -633,9 +639,7 @@ describe.skipIf(!shouldRunIntegration)( retryCount: 0, } - await expect( - processor.processOutputResult(args), - ).resolves.toBeDefined() + await expect(processor.processOutputResult(args)).resolves.toBeDefined() }) }) }, diff --git a/packages/tools/test/mastra/unit.test.ts b/packages/tools/test/mastra/unit.test.ts index 26a4f6d7..0161546d 100644 --- a/packages/tools/test/mastra/unit.test.ts +++ b/packages/tools/test/mastra/unit.test.ts @@ -4,7 +4,10 @@ */ import { describe, it, expect, beforeEach, vi, afterEach } from "vitest" -import { RequestContext, MASTRA_THREAD_ID_KEY } from "@mastra/core/request-context" +import { + RequestContext, + MASTRA_THREAD_ID_KEY, +} from "@mastra/core/request-context" import { SupermemoryInputProcessor, SupermemoryOutputProcessor, |