Giter Site home page Giter Site logo

kentcdodds / dom-testing-library-with-anything Goto Github PK

View Code? Open in Web Editor NEW
225.0 7.0 87.0 305 KB

Use DOM Testing Library to test any JS framework on TestingJavaScript.com

Home Page: https://testingjavascript.com/playlists/use-dom-testing-library-to-test-any-js-framework-ae28

License: Other

JavaScript 82.46% TypeScript 16.53% Svelte 1.01%
kcd-edu testingjavascript

dom-testing-library-with-anything's Introduction

dom-testing-library-with-anything's People

Contributors

agubler avatar ajcrites avatar aprillion avatar ashsearle avatar danjordan avatar jennings avatar karthikiyengar avatar kentcdodds avatar michaeldeboey avatar mini-eggs avatar navimarella avatar schuchard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dom-testing-library-with-anything's Issues

Adding await before fireEvent seems to work ok

Hi @kentcdodds,

working on https://testingjavascript.com/lessons/javascript-use-dom-testing-library-with-preact

At the point where you use the custom fireEventAsync, I somewhat randomly left it as await fireEvent, and it worked.

test('renders a counter', async () => {
  const {getByText} = render(<Counter />)
  const counter = getByText('0')

  // This works
  await fireEvent.click(counter)
  expect(counter).toHaveTextContent('1')

  // This still does not work
  fireEvent.click(counter)
  expect(counter).toHaveTextContent('2')
})

As you created fireEvent, it may be a recent change to it, who knows, just thought to mention it.

Cheers!

Svelte tests are stalling indefinitely

Running npm test just displays RUN next to svelte.test.js, even if I wait more than a minute. I thought I saw some sort of error about transforms before, but I can't reproduce it any more.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.