Testing in ReScript

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • rescript-schema

    🧬 The fastest parser in the entire JavaScript ecosystem with a focus on small bundle size and top-notch DX

    Hello, I’m Dmitry Zakharov, a Frontend-engineer at Carla and author of rescript-struct. After using ReScript for two years, of which 9 months are in production, I’ve gotten some insights about testing I wanted to share. I use ReScript not only for FE but for different areas, so if you’re a BE engineer or create a CLI tool, this article will also be useful for you.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • rescript-ava

    ReScript bindings for Ava

    Regarding unit testing, the library you use doesn't really matter. Choose any that works for you. My personal preference is to use bindings for AVA.

  • rescript-jest

    ReScript bindings for Jest

    Another popular option is to use bindings for Jest. However, in my opinion, Jest is a monstrous combine that is slow, has a hacky mock system, bad ESM support, and purely tries to mimic DOM API with JSDOM. AVA literally doesn't have any of these. Also, the available Jest bindings don't allow doing multiple assertions per test, which is often useful to me.

  • rescript-test

    A lightweight test framework for ReScript

    Besides bindings for JavaScript libraries, there is rescript-test - a lightweight test framework written in ReScript for ReScript. I have heard that some people like it, but for me, it lacks coverage output and Wallaby support.

  • execa

    Process execution for humans

    For FE, it’s usually Cypress or Playwright; for BE, it’s to run a server and start sending requests; for CLI, I like the tool called execa.

  • rescript-stdlib-vendorer

    Tool to support usage of a vendored standard library in ReScript

    One problem is that it suggests creating A.res, which is publicly available from other application parts. It’s usually fine for FE apps, but for developing BE and CLIs, I prefer to follow the hexagonal architecture by creating the implementation inside the Main.res and passing it to other modules via function arguments. Once again, an example from rescript-stdlib-vendorer:

  • Playwright

    Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

    For FE, it’s usually Cypress or Playwright; for BE, it’s to run a server and start sending requests; for CLI, I like the tool called execa.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • ESLint

    Find and fix problems in your JavaScript code.

    If you are afraid of test code leaking into the application. You can use eslint to prevent this:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • TypeScript Boilerplate

    6 projects | dev.to | 17 Sep 2023
  • Create a typescript utility library using Vite

    6 projects | dev.to | 14 Aug 2023
  • Conditional Logging to the JavaScript Console

    4 projects | dev.to | 14 Nov 2022
  • The Complete Guide To Full Stack Development On BSV Blockchain with React, sCrypt, Typescript and Panda.

    5 projects | dev.to | 21 Jun 2024
  • Git Project Configuration With Husky and ESLint

    6 projects | dev.to | 8 Apr 2024