Buckets:
| import { describe, expect, test } from "bun:test" | |
| import { upsertCommandRegistration } from "./command" | |
| describe("upsertCommandRegistration", () => { | |
| test("replaces keyed registrations", () => { | |
| const one = () => [{ id: "one", title: "One" }] | |
| const two = () => [{ id: "two", title: "Two" }] | |
| const next = upsertCommandRegistration([{ key: "layout", options: one }], { key: "layout", options: two }) | |
| expect(next).toHaveLength(1) | |
| expect(next[0]?.options).toBe(two) | |
| }) | |
| test("keeps unkeyed registrations additive", () => { | |
| const one = () => [{ id: "one", title: "One" }] | |
| const two = () => [{ id: "two", title: "Two" }] | |
| const next = upsertCommandRegistration([{ options: one }], { options: two }) | |
| expect(next).toHaveLength(2) | |
| expect(next[0]?.options).toBe(two) | |
| expect(next[1]?.options).toBe(one) | |
| }) | |
| }) | |
Xet Storage Details
- Size:
- 854 Bytes
- Xet hash:
- 8703c9d5f5d9b3e89362f95082da162a60d23cc003485e5c970e916793e897e3
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.