mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-11 01:02:01 +03:00
Merge 136aca1201 into 37cfd2144b
This commit is contained in:
commit
1420eedbae
1 changed files with 2 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { describe, it, expect } from "vitest";
|
||||
import { qty, pct, Decimal } from "./types";
|
||||
import { qty, pct, Decimal, Unit } from "./types";
|
||||
|
||||
describe("types", () => {
|
||||
describe("qty", () => {
|
||||
|
|
@ -13,7 +13,7 @@ describe("types", () => {
|
|||
});
|
||||
|
||||
it("creates a quantity with all arguments provided", () => {
|
||||
const mockUnit = { id: "meter", dimension: "length", ratio: new Decimal(1), format: "m" } as any;
|
||||
const mockUnit: Unit = { id: "meter", dimension: "length", ratio: new Decimal(1), format: "m" };
|
||||
const result = qty("3.14", mockUnit, "hex");
|
||||
expect(result.kind).toBe("quantity");
|
||||
expect(result.value).toBeInstanceOf(Decimal);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue