wyze / bs-jest-dom Goto Github PK
View Code? Open in Web Editor NEWBuckleScript bindings for jest-dom.
Home Page: https://yarn.pm/bs-jest-dom
License: MIT License
BuckleScript bindings for jest-dom.
Home Page: https://yarn.pm/bs-jest-dom
License: MIT License
Peer deps should be updated. (bs-jest)
I think this happens for bs-react-testing-library bs-dom-testing-library too. (reason-react)
bs-jest-dom: 4.0.0
For example, add following test case:
test("Jest.Expect.toEqual", () =>
"Foo" |> expect |> Jest.Expect.toEqual("Foo")
);
to the file after line 480:
bs-jest-dom/src/__tests__/JestDom_test.re
Lines 474 to 480 in aa5fcb5
save and run yarn test
, you will get following error:
We've found a bug for you!
/Users/jihchi/Repos/bs-jest-dom/src/__tests__/JestDom_test.re 483:12-17
481 │
482 │ test("Expect.toEqual", () =>
483 │ "Foo" |> expect |> Expect.toEqual("Foo")
484 │ );
This has type:
JestDom.t => JestDom.expect
But somewhere wanted:
string => 'a
The incompatible parts:
JestDom.t (defined as
Dom.eventTarget_like(Dom._node(Dom._element(Dom._baseClass))))
vs
string
Is that expected?
The example from the README with bs-react-testing-library doesn't seem to work after upgrading to 2.0.0
open Jest;
open Expect;
open JestDom;
open ReactTestingLibrary;
module Heading = {
let component = ReasonReact.statelessComponent("Heading");
let make = (~text, _children) => {
...component,
render: _self =>
<h1> {ReasonReact.string(text)} </h1>,
};
};
test("renders in the document", () =>
<Heading text="Hello, World!" />
|> render
|> getByText(~matcher=`Str("Hello, World!"))
|> expect
|> toBeInTheDocument
);
gives the following error
19 │ |> getByText(~matcher=`Str("Hello, World!"))
20 │ |> expect
21 │ |> toBeInTheDocument
22 │ );
This has type:
([< (JestDom.t)JestDom.modifier ] as 'a) => Jest.assertion
But somewhere wanted:
Jest.Expect.plainPartial(Dom.element) => 'b
The incompatible parts:
'a (defined as [< `Just(JestDom.t) ])
vs
Jest.Expect.plainPartial(Dom.element) (defined as [ `Just(Dom.element) ])
Further expanded:
JestDom.t (defined as option(Dom.element))
vs
Dom.element (defined as
Dom.eventTarget_like(Dom._node(Dom._element(Dom._baseClass))))
Types for tag `Just are incompatible
I am using "bs-jest-dom": "^2.0.0"
and "bs-react-testing-library": "^0.4.0"
. Am I missing something?
Hi, do you any plane for this migration ?
Steps to reproduce:
bs-jest-dom
yarn.lock
& run yarn install
yarn add [email protected]
yarn test
to trigger compilationError:
We've found a bug for you!
/Users/pnore/dev/bs-jest-dom/src/JestDom.re
The implementation src/JestDom.mlast
does not match the interface src/jestDom.cmi:
The value `not__' is required but not provided
This is from the change mentioned in the glennsl/bs-jest#41 issue included in 0.4.7, which I think was introduced with [email protected]
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.