Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
bs-dom-testing-library
Advanced tools
BuckleScript bindings for dom-testing-library.
$ yarn add --dev bs-dom-testing-library
# or..
$ npm install --save-dev bs-dom-testing-library
bsconfig.json
{
"bs-dev-dependencies": [
"bs-dom-testing-library"
]
}
bs-jest
/* A_test.re */
open Jest;
[@bs.new]
external domParser : unit => parser = "DOMParser";
[@bs.send.pipe : parser]
external parseFromString : ( string, [@bs.as "text/html"] _) => Dom.element = "";
[@bs.get]
external body : Dom.element => Dom.element = "";
[@bs.get]
external firstChild : Dom.element => Dom.element = "";
describe("prettyDOM", () => {
open Expect;
let div = domParser()
|> parseFromString("<div><b>Hello,</b><p> World!</p></div>")
|> body
|> firstChild;
describe("prettyDOM", () => {
test("works", () => {
let actual = div |> DomTestingLibrary.prettyDOM;
expect(actual) |> toMatchSnapshot;
});
test("works with maxLength", () => {
let actual = div |> DomTestingLibrary.prettyDOM(~maxLength=25);
expect(actual) |> toMatchSnapshot;
});
});
});
See src/__tests__
for some examples.
$ git clone https://github.com/wyze/bs-dom-testing-library.git
$ cd bs-dom-testing-library
$ yarn # or `npm install`
$ yarn build
$ yarn test
7dc39683b9
] - Add some new queries (Neil Kistner)aa21b9fba9
] - Upgrade dependencies (Neil Kistner)da32ce5209
] - Reformat license (Neil Kistner)9f9bf41821
] - Remove coverage badge (Neil Kistner)MIT © Neil Kistner
FAQs
BuckleScript bindings for dom-testing-library.
The npm package bs-dom-testing-library receives a total of 293 weekly downloads. As such, bs-dom-testing-library popularity was classified as not popular.
We found that bs-dom-testing-library demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.