Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bs-dom-testing-library

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bs-dom-testing-library

BuckleScript bindings for dom-testing-library.

  • 0.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
262
increased by19.09%
Maintainers
1
Weekly downloads
 
Created
Source

bs-dom-testing-library · Build Status npm Coveralls

BuckleScript bindings for dom-testing-library.

Documentation

Read the docs | Edit the docs

Installation

$ yarn add --dev bs-dom-testing-library

# or..

$ npm install --save-dev bs-dom-testing-library

Usage

Add to bsconfig.json
{
  "bs-dev-dependencies": [
    "bs-dom-testing-library"
  ]
}
With bs-jest
/* Header_test.re */

open Jest;
open Expect;
open Webapi.Dom;
open Webapi.Dom.Element;

test("header exists", () => {
  let div = Document.createElement("div", document);

  div->setInnerHTML({|<h1>Hello, World!</h1>|});

  div
  |> getByText(~matcher=`Str("Hello, World!"))
  |> expect
  |> ExpectJs.toBeTruthy;
});

Examples

See src/__tests__ for some examples.

Development

$ git clone https://github.com/wyze/bs-dom-testing-library.git
$ cd bs-dom-testing-library
$ yarn # or `npm install`

Build

$ yarn build

Test

$ yarn test

Change Log

Full Change Log

v0.7.0 (2020-10-21)

  • Add waitForElementToBeRemoved (@wyze in #23)
  • Add more ByRole options (@wyze in #22)
  • Update some of the utility functions (@wyze in #21)
  • Add sponsor button (@wyze in dec1dab)
  • Upgrade to latest dependencies (@wyze in #20)

License

MIT © Neil Kistner

Keywords

FAQs

Package last updated on 21 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc