image2text

Untitled

Jul 28th, 2019
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. [ X N J
  2.  
  3. import server from "miragejs/src/server"
  4.  
  5. test("it fetches todos from the server", async () => {
  6. server.db.loadData({
  7.  
  8. todos: [{ 1d: 1, text: "Write more tests!" }],
  9.  
  10. )
  11. let { findByTestId, findByDisplayValue } = render(<TodoApp />)
  12. let todo = await findByTestId("todo-id-1")
  13. let input = await findByDisplayValue("Write more tests!")
  14. expect(todo).toBeInTheDocument( )
  15. expect(input).toBeInTheDocument( )
  16.  
  17. )
Advertisement
Add Comment
Please, Sign In to add comment