mirror of
https://github.com/EveryInc/compound-engineering-plugin.git
synced 2026-10-28 18:15:22 +01:00
12 lines
410 B
JavaScript
12 lines
410 B
JavaScript
import { test } from "node:test"
|
|
import assert from "node:assert/strict"
|
|
import { exportJson } from "./src/export.js"
|
|
|
|
const record = { id: "r1", accountId: "a1", data: ["value"] }
|
|
test("owner receives existing JSON export", () => {
|
|
assert.equal(exportJson(record, "a1"), '["value"]')
|
|
})
|
|
test("JSON export rejects another account", () => {
|
|
assert.throws(() => exportJson(record, "a2"), { status: 403 })
|
|
})
|