Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run all tests with mocha after all #7076

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ if (process.argv.includes("-mocha")) {
mochaTest = true;
}

if (process.argv.includes("-node")) {
nodeTest = true;
}

if (process.argv.includes("-bsb")) {
bsbTest = true;
}
Expand Down Expand Up @@ -61,31 +57,23 @@ async function runTests() {
});
}

if (mochaTest || nodeTest) {
if (mochaTest) {
cp.execSync(rescript_exe, {
cwd: path.join(__dirname, "..", "tests/tests"),
stdio: [0, 1, 2],
});

cp.execSync(rescript_exe, {
cwd: path.join(__dirname, "..", "tests/tests_esmodule"),
stdio: [0, 1, 2],
});
}

if (mochaTest) {
cp.execSync(`npx mocha -t 10000 tests/tests/**/*_test.js`, {
cwd: path.join(__dirname, ".."),
stdio: [0, 1, 2],
});
}

if (nodeTest) {
cp.execSync(`node --test tests/tests/**/*_ntest.js`, {
cwd: path.join(__dirname, ".."),
stdio: [0, 1, 2],
});
}

if (bsbTest) {
console.log("Doing build_tests");
const buildTestDir = path.join(__dirname, "..", "tests", "build_tests");
Expand Down
46 changes: 0 additions & 46 deletions tests/tests/src/belt_float_ntest.js

This file was deleted.

46 changes: 46 additions & 0 deletions tests/tests/src/belt_float_test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
open Node_test
open Node_test_util
open Mocha
open Test_utils

module F = Belt.Float

describe("Belt.Float", () => {
describe(__MODULE__, () => {
test("fromInt", () => {
eq(__LOC__, F.fromInt(1), 1.0)
eq(__LOC__, F.fromInt(-1), -1.0)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Node_test
open Node_test_util
open Mocha
open Test_utils

module N = Belt.HashMap
module S = Belt.Map.Int
Expand All @@ -13,7 +13,7 @@ let cmp = (x: int, y) => compare(x, y)
module Y = unpack(Belt.Id.hashable(~eq=intEq, ~hash=intHash))
let empty: N.t<int, int, _> = N.make(~id=module(Y), ~hintSize=30)

describe("Belt.HashMap", () => {
describe(__MODULE__, () => {
test("fromArray", () => {
let u = A.concat(I.randomRange(30, 100), I.randomRange(40, 120))
let v = A.zip(u, u)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Node_test
open Node_test_util
open Mocha
open Test_utils

module N = Belt.HashSet.Int
module S = Belt.Set.Int
Expand All @@ -15,7 +15,7 @@ let sum2 = h => {
v.contents
}

describe("Belt.HashSet.Int", () => {
describe(__MODULE__, () => {
test("fromArray", () => {
let u = A.concat(I.randomRange(30, 100), I.randomRange(40, 120))
let v = N.fromArray(u)
Expand Down
45 changes: 0 additions & 45 deletions tests/tests/src/belt_int_ntest.js

This file was deleted.

Loading