mirror of
https://github.com/rustfs/console.git
synced 2026-10-30 19:33:40 +08:00
16 lines
536 B
JavaScript
16 lines
536 B
JavaScript
import test from "node:test"
|
|
import assert from "node:assert/strict"
|
|
import { readFile } from "node:fs/promises"
|
|
|
|
const bucketPages = ["components/buckets/list.tsx", "app/(dashboard)/browser/page.tsx"]
|
|
|
|
for (const file of bucketPages) {
|
|
test(`${file} uses accountinfo as the bucket statistics source`, async () => {
|
|
const source = await readFile(file, "utf8")
|
|
|
|
assert.match(source, /getAccountBucketUsage\(userInfo\)/)
|
|
assert.match(source, /fetchUserPolicy\(\)/)
|
|
assert.doesNotMatch(source, /getDataUsageInfo/)
|
|
})
|
|
}
|