-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from ahrefs/reason-syntax
Generate docs for both reason & ocaml syntax
- Loading branch information
Showing
12 changed files
with
91 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
node_modules | ||
_build | ||
_opam | ||
_docs | ||
dist/ | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Unreleased | ||
|
||
- Add bindings for `node:test` and `node:assert/strict` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,47 @@ | ||
# melange-fest | ||
|
||
A minimal test framework for Melange using Node [test runner](https://nodejs.org/api/test.html). | ||
A minimal test framework for Melange using [Node test | ||
runner](https://nodejs.org/api/test.html). | ||
|
||
## Quick Start | ||
|
||
tbd | ||
```reason | ||
open Fest | ||
test("1+1=2", () => expect |> equal(1 + 1, 2)); | ||
``` | ||
|
||
### React | ||
|
||
React support is provided by | ||
[`reason-react`](https://github.com/reasonml/reason-react/). | ||
|
||
More info tbd. | ||
```reason | ||
open Fest; | ||
module RTL = ReactTestingLibrary; | ||
[@mel.get] external textContent: Dom.element => string = "textContent"; | ||
Domloader.init(); | ||
module Hello = { | ||
[@react.component] | ||
let make = (~text) => <div> {"Hello " ++ text |> React.string} </div>; | ||
}; | ||
let () = | ||
test("test component", () => { | ||
let result = RTL.render(<Hello text="Nila" />); | ||
// Check that Hello component renders the name properly. | ||
let el = RTL.getByText(~matcher=`Str("Hello Nila"), result); | ||
expect |> equal(textContent(el), "Hello Nila"); | ||
}); | ||
``` | ||
|
||
## Commands | ||
|
||
tbd | ||
Run all tests: | ||
|
||
```bash | ||
make test | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>index</title> | ||
<link rel="stylesheet" href="./odoc.support/odoc.css"/> | ||
<meta charset="utf-8"/> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/> | ||
</head> | ||
<body> | ||
<main class="content"> | ||
<div class="by-name"> | ||
<h2>melange-fest documentation</h2> | ||
<ul> | ||
<li><a href="reason">Reason docs</a></li> | ||
<li><a href="ocaml">OCaml docs</a></li> | ||
</ul> | ||
</div> | ||
</main> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters