Software Alternatives & Reviews

Hack to Run React Application inside Service Worker

react-testing-library jsdom Browserify
  1. [`React Testing Library`][gh] builds on top of `DOM Testing Library` by adding
    I've started creating a PoC. My first try was searching for library that was used for testing react app. Since you can't use real DOM inside Service Woker. I was looking at react testing library documentation in hope that they use some kind of fake DOM library, but after looking at code it was using real ReactDOM and also it was not very intuitive. They lack getElementByID and was created just for making tests. So I've abandoned the idea of using testing library.

    #Developer Tools #Testing #Automated Testing 113 social mentions

  2. 2
    A JavaScript implementation of various web standards, for use with Node.js - jsdom/jsdom
    Pricing:
    • Open Source
    But then I realized that I should probably will need to use jsDOM. This is the library that can be used in nodejs to mock the DOM. This is what jest testing framework is using and this is what I was using to test jQuery Terminal library in Jasmine before jest was created.

    #Development #Browser Testing #Automated Testing 28 social mentions

  3. Browserify lets you require('modules') in the browser by bundling up all of your dependencies.
    Pricing:
    • Open Source
    One problem was to run jsDOM as UMD module. But luckly I was able to use browserify to compile jsDOM into UMD.

    #JS Build Tools #Module Bundler #Web Application Bundler 21 social mentions

Discuss: Hack to Run React Application inside Service Worker

Log in or Post with