Software Alternatives, Accelerators & Startups
Table of contents
  1. Videos
  2. Social Mentions
  3. Comments

jsdom

A JavaScript implementation of various web standards, for use with Node.js - jsdom/jsdom.

jsdom Reviews and details

Screenshots and images

  • jsdom Landing page
    Landing page //
    2023-08-29

Features & Specs

  1. Browser-like Environment

    jsdom provides a virtual representation of the browser's DOM environment, which allows developers to run scripts that usually require a browser.

  2. Node.js Integration

    Being a Node.js library, jsdom can be easily integrated into server-side applications, enabling server-side DOM manipulation.

  3. Testing Facilitation

    jsdom is commonly used in testing frameworks to simulate browser environments, allowing for headless testing of front-end code.

  4. Standard-compliant

    jsdom strives to be compliant with web standards, which ensures consistent behavior with real browser environments.

  5. Rich API

    It provides a rich set of APIs that mimic the browser DOM, making it comprehensive for developers needing browser-like functionality.

Badges

Promote jsdom. You can add any of these badges on your website.

SaaSHub badge
Show embed code

Videos

JSDom & Enzyme: Different Test Styles for React Apps - Dan La Feir @ ReactNYC

Frontend Pairing - Discovering missing JSDOM APIs that didn’t allow to test Toast UI in jest

Social recommendations and mentions

We have tracked the following product recommendations or mentions on various public social media platforms and blogs. They can help you see what people think about jsdom and what they use it for.
  • Proton: Pluggable SSR + DOM | Or How I implemented better SSR from scratch
    Nah, I took a third path - looking for alternatives to JSDOM... And I found it - happy-dom. - Source: dev.to / 22 days ago
  • The Future of Htmx
    We do have pseudo-browsers written in pure js that you can theoretically use: https://github.com/jsdom/jsdom but they're about as reliable as you can expect: it's difficult to keep up the pace with the big three (or two) on standards compliance, and they usually don't even try. So the only reliable solution is a headless Chromium, Firefox, and/or WebKit-based noname browser like the sibling says.... - Source: Hacker News / 4 months ago
  • Go-DOM - A headless browser written in Go.
    Internally the test starts an HTTP server. Because the this runs in the test process, mocking and stubbing of business logic is possible. The test use jsdom to communicate with the HTTP server; which both parse the HTML response into a DOM, but also executes client-side script in a sandbox which has been initialised, e.g. With window as the global scope.3. - Source: dev.to / 6 months ago
  • Excluding Dependencies: Bundling for Node and the Browser
    For example, I needed to parse an HTML string into a DOM Document. The browser already supports the DOMParser class, which is, unfortunately, not available in Node.js. Here, I have to fall back on JSDOM, which also exposes this class. - Source: dev.to / 11 months ago
  • Migrating from Jest to Vitest for your React Application
    If you happen to be using React Testing Library in your project, you'll need to keep the jsdom dev dependency installed. - Source: dev.to / over 1 year ago
  • Building a Serverless Reader View with Lambda and Chrome
    Readability.js requires a DOM object to parse the readable content from a website. That's why we create a DOM object with JSDOM and provide the HTML from the page and its current URL. By the way, the browser may have had to follow HTTP redirects, so the current URL doesn't necessarily have to be the one we provided initially. The parse function of the library returns the following result:. - Source: dev.to / over 1 year ago
  • Portadom: A Unified Interface for DOM Manipulation
    Web scraping, while immensely useful, often requires developers to navigate a sea of tools and libraries, each with its own quirks and intricacies. Whether it's JSDOM, Cheerio, Playwright, or even just plain old vanilla JS in the DevTools console, moving between these platforms can be a challenge. - Source: dev.to / over 1 year ago
  • PoC of ReactJS app inside Service Worker
    The code uses jSDom to render the app but I was wondering if it's possible to run the app without the UI to be able to use a library like that to generate the string from react element. Source: almost 2 years ago
  • React component testing with Vitest efficiently
    JSDOM as the DOM environment for running our tests. - Source: dev.to / almost 2 years ago
  • The Art of Side Effects in React.js: Understanding and Using the useEffect Hook
    JSDom is a JavaScript implementation of the DOM and browser APIs that runs in Node.js. Jest uses JSDom to create a mock DOM for your tests, allowing you to test components and hooks that interact with the DOM. - Source: dev.to / almost 2 years ago
  • Multithreading with a websocket client and a simulation: how to block a thread?
    I am using jsdom to run a simulation. This simulation needs to communicate through a websocket with a Python server I have. I am using websocket client. My problem is that I need to immediately block the simulation at certain points until I have received a message from the server through the websocket, and then continue synchronously from where the simulation was blocked. The websocket client and the jsdom threads... Source: about 2 years ago
  • Adding a Table of Contents to dynamic content in 11ty
    In my blogposts.js data file I added the following function (utilizing jsdom) that. - Source: dev.to / about 2 years ago
  • Hack to Run React Application inside Service Worker
    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. - Source: dev.to / over 2 years ago
  • [AskJS] I want to use Javascript to get a specific text from a website. .getElementbyId
    The npm package axios helps with getting the HTML from the URL, then you have to parse the raw HTML to a DOM with something like jsdom or, cheerio (jQuery syntax). Source: over 2 years ago
  • Introducing Angular Component Testing
    The Cypress Test Runner is browser-based, which allows you to test-drive your component’s styles and API in an isolated way that you do not get with headless unit testing via a jsdom. - Source: dev.to / over 2 years ago
  • How We Test Semi Design React Component
    JSDOM is a pure JS implementation of web standards like DOM and HTML for Node.js. When used with Enzyme, JSDOM emulates the DOM manipulation environment for Enzyme. But there are some limitations like no navigation and layout. JSDOM will return 0 when using layout related functions like getBoundingClientRects and properties like offsetTop . - Source: dev.to / almost 3 years ago
  • Migrating from Jest to Vitest
    Jsdom: To mimic the browser while running tests. - Source: dev.to / almost 3 years ago
  • PurgeCSS & styled-components: Does It Work?
    This project is very interesting. It actually solves the problem of excess CSS the best; it does so by loading your HTML into jsdom, and then querySelector-ing all of the selectors found in your CSS against the emulated DOM. If a selector isn't found in the emulated DOM, UnCSS will not include the CSS rule in its output. - Source: dev.to / about 3 years ago
  • Robin: An XML/HTML Parser and Library
    You should probably add a section to the README explaining why this is useful compared to the alternatives. For example, DOMParser which is built into a web browser, or JSDOM which is the most popular and comprehensive Node in-memory DOM implementation. Source: about 3 years ago
  • Setup Jest to React Typescript Vite project, also SWC (part 1)
    Everything you want to do to your test environment such as extends the jest matchers with @testing-library/jest-dom, mock some APIs that’s not implemented in jdom, you can put to config/jest/setupTests.js:. - Source: dev.to / about 3 years ago
  • Testing your Solid.js code in vitest
    You may have heard of vite, the slim fast dev server that scored an amazing as deserved 98% satisfaction on the state of js survey 2021. It's creators found unit testing too cumbersome and slow and decided to add their own perspective to the task. The result is vitest: it runs a vite server under the hood to transform the code to test as fast as possible, uses an enhanced flavor of chai to have jest-compatible... - Source: dev.to / about 3 years ago

Do you know an article comparing jsdom to other products?
Suggest a link to a post with product alternatives.

Suggest an article

jsdom discussion

Log in or Post with

This is an informative page about jsdom. You can review and discuss the product here. The primary details have not been verified within the last quarter, and they might be outdated. If you think we are missing something, please use the means on this page to comment or suggest changes. All reviews and comments are highly encouranged and appreciated as they help everyone in the community to make an informed choice. Please always be kind and objective when evaluating a product and sharing your opinion.