aboutsummaryrefslogtreecommitdiff
path: root/test/console/components/InfoMessage.test.tsx
blob: 9f3a68daede865d50db16bd3ce83056cc314155f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import React from "react";
import ReactTestRenderer from "react-test-renderer";
import InfoMessage from "../../../src/console/components/InfoMessage";

describe("console/components/console/completion/InfoMessage", () => {
  it("renders an information message", () => {
    const root = ReactTestRenderer.create(
      <InfoMessage>Hello!</InfoMessage>
    ).root;

    const p = root.findByType("p");

    expect(p.props["role"]).toEqual("status");
    expect(p.children).toEqual(["Hello!"]);
  });
});