Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit c92721f

Browse files
committed
Put tests inside a test
1 parent b7d08df commit c92721f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/tostring.test.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@ import { Decimal128 } from "../src/decimal128.mjs";
22
import { expectDecimal128 } from "./util.js";
33

44
describe("NaN", () => {
5-
expect(new Decimal128("NaN").toString()).toStrictEqual("NaN");
5+
test("works", () => {
6+
expect(new Decimal128("NaN").toString()).toStrictEqual("NaN");
7+
});
68
});
79

810
describe("zero", () => {
9-
expect(new Decimal128("0").toString()).toStrictEqual("0");
11+
test("positive zero", () => {
12+
expect(new Decimal128("0").toString()).toStrictEqual("0");
13+
});
14+
test("negative zero", () => {
15+
expect(new Decimal128("-0").toString()).toStrictEqual("-0");
16+
});
1017
});
1118

1219
describe("infinity", () => {

0 commit comments

Comments
 (0)