mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Implement simple Project Summary page (#71)
This implements a very simple Project Summary page (which lists workspaces):  ...which also has an empty state:  Fixes #66
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { firstOrItem } from "./array"
|
||||
|
||||
describe("array", () => {
|
||||
describe("firstOrItem", () => {
|
||||
it("returns null if empty array", () => {
|
||||
expect(firstOrItem([])).toBeNull()
|
||||
})
|
||||
|
||||
it("returns first item if array with more one item", () => {
|
||||
expect(firstOrItem(["a", "b"])).toEqual("a")
|
||||
})
|
||||
|
||||
it("returns item if single item", () => {
|
||||
expect(firstOrItem("c")).toEqual("c")
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user