Skip to content

Commit

Permalink
refactor: simplify error handling in test file ♻️
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Dec 13, 2024
1 parent 4aa8f89 commit 1b273d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions packages/cli/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ import {
} from "../../core/src/server/messages"
import { generatePromptFooConfiguration } from "../../core/src/test"
import { delay } from "es-toolkit"
import {
resolveModelConnectionInfo,
} from "../../core/src/models"
import { resolveModelConnectionInfo } from "../../core/src/models"
import { filterScripts } from "../../core/src/ast"
import { link } from "../../core/src/markdown"

Expand Down Expand Up @@ -251,11 +249,6 @@ genaiscript test view
outSummary,
`- ${ok ? EMOJI_SUCCESS : EMOJI_FAIL} ${script.id} ${url}\n`
)
if (error)
await appendFile(
outSummary,
`\n\n\`\`\`\n${JSON.stringify(error, null, 2)}\n\`\`\`\n\n`
)
}
results.push({
status,
Expand Down
2 changes: 1 addition & 1 deletion packages/sample/src/rag/markdown.md.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Markdown is a lightweight markup language used for adding formatting elements to plain text documents. Created by John Gruber in 2004, it has become one of the most popular markup languages. Unlike WYSIWYG editors such as Microsoft Word, where formatting changes are made through button clicks, Markdown requires the user to add syntax to indicate formatting. For example, a heading is denoted by a number sign (e.g., # Heading One), and bold text is surrounded by two asterisks (e.g., **this text is bold**). It may take some time to adapt to using Markdown syntax, especially for those used to WYSIWYG applications.
Markdown is a lightweight markup language created by John Gruber in 2004 that allows users to add formatting elements to plain text documents. Unlike WYSIWYG editors, where formatting changes are visible immediately through button clicks, Markdown requires users to apply syntax to text to indicate formatting. For example, a heading is indicated with a number sign (e.g., # Heading One), and bold text is created with two asterisks (e.g., **this text is bold**). It may take some time to adapt to this syntax for those familiar with WYSIWYG applications.

0 comments on commit 1b273d5

Please sign in to comment.