mirror of
https://github.com/rustfs/console.git
synced 2026-08-29 03:52:28 +08:00
13 lines
512 B
JavaScript
13 lines
512 B
JavaScript
import test from "node:test"
|
|
import assert from "node:assert/strict"
|
|
import fs from "node:fs"
|
|
|
|
test("DataTable renders request failures as an announced error state before empty content", () => {
|
|
const source = fs.readFileSync("components/data-table/data-table.tsx", "utf8")
|
|
|
|
assert.match(source, /errorTitle\?: string/)
|
|
assert.match(source, /\) : errorTitle \? \(/)
|
|
assert.match(source, /<div role="alert">/)
|
|
assert.match(source, /<EmptyState title=\{errorTitle\} description=\{errorDescription\}/)
|
|
})
|