Gates.Test

loom-buildertesttypescript
Path: loom-builder/src/gates.test.tsRelative: src/gates.test.tsSubproject: loom-builderCategory: dispatch-system
Lines: 175Bytes: 6,688Imports: 3Exports: 0has tests

Content Preview

  1. import { describe, expect, test } from "bun:test";
  2. import {
  3. BudgetGovernor,
  4. LoopDetector,
  5. actionHash,
  6. canonicalJSON,
  7. destructiveBashReason,
  8. isIdempotentObservation,
  9. lintValidationGates,
  10. standardGateCmds,
  11. } from "./gates.js";
  12. import { GateHaltError } from "./types.js";
  13. describe("canonicalJSON / actionHash", () => {
  14. test("key order does not change hash", () => {
  15. expect(actionHash("bash", { a: 1, b: 2 })).toBe(actionHash("bash", { b: 2, a: 1 }));
  16. });
  17. test("different args