Skip to content

Feat/svelte_component_tests-fix-config #1718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: feat/svelte_component_tests
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/lib/components/chat/MarkdownRenderer.svelte.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ describe("MarkdownRenderer", () => {
const { baseElement } = render(MarkdownRenderer, { content: "```\n$(oo)^2$\n```" });
expect(baseElement.querySelectorAll(".katex")).toHaveLength(0);
});
it.todo("does not render latex in inline codes", () => {
it("does not render latex in inline codes", () => {
const { baseElement } = render(MarkdownRenderer, { content: "`$oo` and `$bar`" });
expect(baseElement.querySelectorAll(".katex")).toHaveLength(0);
});
it.todo("does not render latex across multiple lines", () => {
it("does not render latex across multiple lines", () => {
const { baseElement } = render(MarkdownRenderer, { content: "* $oo \n* $aa" });
expect(baseElement.querySelectorAll(".katex")).toHaveLength(0);
});
it.todo("renders latex with some < and > symbols", () => {
it("renders latex with some < and > symbols", () => {
const { baseElement } = render(MarkdownRenderer, { content: "$foo < bar > baz$" });
expect(baseElement.querySelectorAll(".katex")).toHaveLength(1);
});
Expand Down
2 changes: 2 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ export default defineConfig({
test: {
name: "node",
include: ["src/**/*.spec.ts"],
exclude: ["src/**/*.svelte.spec.ts"],
environment: "node",
setupFiles: ["./scripts/setupTest.ts"],
deps: { inline: ["@sveltejs/kit"] },
globals: true,
},
},
{
extends: true,
test: {
name: "jsdom",
include: ["src/**/*.svelte.spec.ts"],
Expand Down
Loading