home.social

#mochajs — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #mochajs, aggregated by home.social.

fetched live
  1. RE: lascapi.fr/blog/2026/03/02/cre

    Hi! A big #question for #webdev

    // Context: a #Tauri application written in plain #JavaScript.

    I used the #DOMParser to read an HTML file and display it as #Markdown.
    For unit testing, I use #MochaJs, and I wanted to run the tests in the command line interface (CLI) with #nodejs.
    However, Node.js does not have the DOMParser library. :/

    I then used jsdom to develop the function in a behaviour-driven development style, but this cannot be run in a browser.

    I now realise that trying to test this functionality in this way is not a good idea.

    What can I use instead? ??

    You're welcome to #boost or ask for clarifications. :)

  2. Published a first draft of Collective Funds Guidelines: github.com/collective-funds/gu

    First user will be Mocha and its inspired by prior art of awesome fellow @openjsf projects @eslint and WebdriverIO 🙏

    Thanks to (in no special order) @JoshuaKGoldberg, @mcollina, @west, @ulisesgascon, @uzlopak, @bcomnes for review, feedback and suggestions that helped shape this 🙏

    #opensource #OpenSourceFunding #opencollective #mochajs

  3. Did my first #npmRelease of #MochaJS. Version 10.4.0 is now available, including some features and some fixes: github.com/mochajs/mocha/relea

    Great collaboration with @JoshuaKGoldberg and @uzlopak as well as with the individual contributors.

    Next up I hope to pick up the pace of my contributions on this project, but first I have some standard linting to enhance :BlobhajHeart:

  4. #16: #mochajs - "A feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple."

  5. @TheRealPomax I’m still a fan of #MochaJS with #Chai assertions. Jest requires to much to get it to work with modern #JavaScript development practices, it doesn’t even work well with #TypeScript and #ESModules.

  6. (if you don't call your API/DB sync way, #mochajs will not wait till the request is finished, meaning test results will not be stored.)
    disclaimer: maybe it still works on different envs than darwin (macs) but not based on what I was reading... 🤷‍♂️

  7. Now, why is there still a use case for needing sync code execution (instead of async)? Well, many reasons, like writing a custom #mochajs runner (@[email protected] uses mocha as well) where you need to send results to any database a the end of the test run - basic use case.