Last active
September 27, 2022 14:45
-
-
Save marta-pinkowska/3ec5f99e31331926859d0cb2661dc59b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/FancyHomepageFeature/__tests__/FancyHomePage.test.js | |
import { FancyHomePage } from "../FancyHomePage"; | |
import { | |
setupHomeHandlers, | |
setupFaultyHomeHandlers, | |
setupFailedHomeHandlers, | |
} from "./msw/mswHandlers"; | |
describe("<FancyHomePage />", () => { | |
beforeEach(() => setupHomeHandlers()); | |
test("displays homepage data", async () => { | |
// Render homepage with backend data | |
}); | |
}); | |
describe("<FancyHomePage /> - faulty data", () => { | |
beforeEach(() => setupFaultyHomeHandlers()); | |
test("displays readable error when receiving unexpected data", async () => { | |
// Render homepage with error information | |
}); | |
}); | |
describe("<FancyHomePage /> - network error", () => { | |
beforeEach(() => setupFailedHomeHandlers()); | |
test("displays network error", async () => { | |
// Render homepage with network error information | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment