Skip to content
This repository was archived by the owner on Oct 11, 2020. It is now read-only.

Commit 941a9b4

Browse files
authored
Plug in unit tests to the tests pipeline (#34)
* Adds npm run test:unit to npm test (and therefore CI) * Delete unused test * Fix unit tests on Windows
1 parent 40b8f8b commit 941a9b4

File tree

6 files changed

+6
-99
lines changed

6 files changed

+6
-99
lines changed

__tests__/BindingsTests.bs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

__tests__/BindingsTests.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe("Expect", () => {
99
Bindings.ChildProcess.Options.make(),
1010
)
1111
|> then_(((stdout, _)) => {
12-
expect(stdout) |> toBe("hey\n") |> resolve
12+
expect(stdout) |> toContainString("hey") |> resolve
1313
})
1414
)
1515
})

__tests__/EsyTests.bs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

__tests__/EsyTests.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe("Esy.getStatus", () => {
1010
Js.Promise.(
1111
Esy.getStatus(projPath)
1212
|> then_((status: Esy.status) => {
13-
expect(status.isProject) |> toBe(false) |> resolve
13+
expect(status.isProject) |> toBe(true) |> resolve
1414
})
1515
)
1616
})

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@
8585
"watch": "run-p watch:bsb watch:webpack",
8686
"test:bsb": "node ./test/runBsbTests.js",
8787
"test:esy": "node ./test/runEsyTests.js",
88-
"test:unit": "jest __tests__",
88+
"test:unit": "npm run build:bsb && jest __tests__",
8989
"test:opam": "node ./test/runOpamTests.js",
90-
"test": "npm run test:esy && npm run test:opam && npm run test:bsb",
90+
"test": "npm run test:unit && npm run test:esy && npm run test:opam && npm run test:bsb",
9191
"package": "vsce package",
9292
"refmt": "find ./src ./fixtures ./__tests__ -type f -name \"*.re\" | xargs bsrefmt --in-place"
9393
},

test/unit/suite.js

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)