Convert Beenvoice to a Turborepo monorepo
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
/// <reference types="bun" />
|
||||
|
||||
import { afterEach, describe, expect, test } from "bun:test";
|
||||
import {
|
||||
EXPENSE_CATEGORIES as domainExpenseCategories,
|
||||
formatElapsedSeconds as formatDomainElapsedSeconds,
|
||||
getEffectiveInvoiceStatus,
|
||||
} from "@beenvoice/domain";
|
||||
|
||||
import { fetchAuthCapabilities } from "../lib/auth-capabilities";
|
||||
import { EXPENSE_CATEGORIES as appExpenseCategories } from "../lib/expense-categories";
|
||||
import { getInvoiceStatus } from "../lib/invoice-status";
|
||||
import { formatElapsedSeconds as formatAppElapsedSeconds } from "../lib/time-clock";
|
||||
import { EXPENSE_CATEGORIES as webExpenseCategories } from "../../beenvoice-web/src/lib/expense-categories";
|
||||
import { getEffectiveInvoiceStatus } from "../../beenvoice-web/src/lib/invoice-status";
|
||||
import { safeCallbackPath } from "../../beenvoice-web/src/lib/safe-callback-url";
|
||||
import { safeCallbackPath } from "../../web/src/lib/safe-callback-url";
|
||||
import {
|
||||
formatElapsedSeconds as formatWebElapsedSeconds,
|
||||
normalizeOptionalId,
|
||||
} from "../../beenvoice-web/src/lib/time-clock";
|
||||
} from "../../web/src/lib/time-clock";
|
||||
|
||||
const originalFetch = globalThis.fetch;
|
||||
|
||||
@@ -85,7 +87,7 @@ describe("timer parity", () => {
|
||||
test("elapsed time formatting is identical", () => {
|
||||
for (const seconds of [0, 59, 60, 3_661, 86_399]) {
|
||||
expect(formatAppElapsedSeconds(seconds)).toBe(
|
||||
formatWebElapsedSeconds(seconds),
|
||||
formatDomainElapsedSeconds(seconds),
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -99,6 +101,6 @@ describe("timer parity", () => {
|
||||
|
||||
describe("expense parity", () => {
|
||||
test("web and mobile expose the same category vocabulary", () => {
|
||||
expect([...appExpenseCategories]).toEqual([...webExpenseCategories]);
|
||||
expect([...appExpenseCategories]).toEqual([...domainExpenseCategories]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user