Spaces:
Configuration error
Configuration error
Download frontend/__tests__/initial-query.test.tsx from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 661 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/__tests__/initial-query.test.tsx
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/__tests__/initial-query.test.tsx
-
curl -L -o initial-query.test.tsx https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/__tests__/initial-query.test.tsx
661 Bytes
| import { describe, it, expect } from "vitest"; | |
| import store from "../src/store"; | |
| import { | |
| setInitialPrompt, | |
| clearInitialPrompt, | |
| } from "../src/state/initial-query-slice"; | |
| describe("Initial Query Behavior", () => { | |
| it("should clear initial query when clearInitialPrompt is dispatched", () => { | |
| // Set up initial query in the store | |
| store.dispatch(setInitialPrompt("test query")); | |
| expect(store.getState().initialQuery.initialPrompt).toBe("test query"); | |
| // Clear the initial query | |
| store.dispatch(clearInitialPrompt()); | |
| // Verify initial query is cleared | |
| expect(store.getState().initialQuery.initialPrompt).toBeNull(); | |
| }); | |
| }); | |