mirror of
https://github.com/coder/coder.git
synced 2026-10-25 09:42:55 +08:00
This ports over a component from v1 that is needed for the v2 workspace page, and adds theme colors for it: <img width="772" alt="Screen Shot 2022-02-05 at 10 39 28 AM" src="https://user-images.githubusercontent.com/88213859/152654601-bab5acca-2e4a-4d53-890f-067a3b864040.png"> Component in storybook:  By bringing in these components ahead of time - it'll make the workspaces page PR smaller.
17 lines
419 B
TypeScript
17 lines
419 B
TypeScript
import { screen } from "@testing-library/react"
|
|
import { render } from "../../test_helpers"
|
|
import React from "react"
|
|
import { CodeBlock } from "./index"
|
|
|
|
describe("CodeBlock", () => {
|
|
it("renders lines)", async () => {
|
|
// When
|
|
render(<CodeBlock lines={["line1", "line2"]} />)
|
|
|
|
// Then
|
|
// Both lines should be rendered
|
|
await screen.findByText("line1")
|
|
await screen.findByText("line2")
|
|
})
|
|
})
|