Skip to content

Commit

Permalink
Update integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Mar 13, 2023
1 parent 5719710 commit 9d92955
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions integration/fetcher-state-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,11 @@ test.describe("fetcher states", () => {
const fetcher = useFetcher();
return (
<>
{fetcher.type === 'init' ?
{fetcher.state === 'idle' && fetcher.data == null ?
<pre id="initial-state">
{
JSON.stringify({
state: fetcher.state,
type: fetcher.type,
formMethod: fetcher.formMethod,
formAction: fetcher.formAction,
formData: fetcher.formData,
Expand Down Expand Up @@ -144,7 +143,11 @@ test.describe("fetcher states", () => {
let text = (await app.getElement("#initial-state")).text();
expect(JSON.parse(text)).toEqual({
state: "idle",
type: "init",
data: undefined,
formData: undefined,
formAction: undefined,
formMethod: undefined,
formEncType: undefined,
});
});

Expand Down Expand Up @@ -189,7 +192,7 @@ test.describe("fetcher states", () => {
let text = (await app.getElement("#states")).text();
expect(JSON.parse(text)).toEqual([
{
state: "submitting",
state: "loading",
formData: { key: "value" },
formAction: "/page",
formMethod: "GET",
Expand Down

0 comments on commit 9d92955

Please sign in to comment.