![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
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.
BuckleScript bindings for Jest - Very very experimental (yep, that's one less "very" than before! Progress!) and WIP
require.*
ExpectJs
. Some functionality does not make sense in a typed language, or is not possible to implement sensibly in ML.MockJs
module as it's very quirky to use with native code. A separate native from-scratch implementation might suddenly appear as Mock
.JestJs
. It's mostly implemented, but experimental and largely untested.(* OCaml *)
open Jest
let _ =
describe "Expect" (fun () ->
let open Expect in
test "toBe" (fun () ->
expect (1 + 2) |> toBe 3);
);
describe "Expect.Operators" (fun () ->
let open Expect in
let open! Expect.Operators in
test "==" (fun () ->
expect (1 + 2) == 3);
);
/* Reason */
open Jest;
describe("Expect", () => {
open Expect;
test("toBe", () =>
expect(1 + 2) |> toBe(3))
});
describe("Expect.Operators", () => {
open Expect;
open! Expect.Operators;
test("==", () =>
expect(1 + 2) === 3)
}
);
See the tests for more examples.
npm install --save-dev bs-jest
Then add bs-jest
to bs-dev-dependencies
in your bsconfig.json
:
{
...
"bs-dev-dependencies": ["bs-jest"]
}
Then add __tests__
to sources
in your bsconfig.json
:
"sources": [
{
"dir": "src"
},
{
"dir": "__tests__",
"type": "dev"
}
]
Put tests in a __tests__
directory and use the suffix *test.ml
/*test.re
(Make sure to use valid module names. e.g. <name>_test.re
is valid while <name>.test.re
is not). When compiled they will be put in a __tests__
directory under lib
, with a *test.js
suffix, ready to be picked up when you run jest
. If you're not already familiar with Jest, see the Jest documentation.
For the moment, please refer to Jest.mli.
git clone https://github.com/reasonml-community/bs-jest.git
cd bs-jest
npm install
Then build and run tests with npm test
, start watchers for bsb
and jest
with npm run watch:bsb
and npm run watch:jest
respectively. Install screen
to be able to use npm run watch:screen
to run both watchers in a single terminal window.
toThrowException
test
function from jestnot_ |> toBeLessThanEqual
testAll
, Only.testAll
, Skip.testAll
that generates tests from a list of inputsfail
expectFn
FAQs
BuckleScript bindings to the Jest testing framework
The npm package bs-jest receives a total of 4 weekly downloads. As such, bs-jest popularity was classified as not popular.
We found that bs-jest 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.