From 2b1079525b86dad45df11e6ad29a89989a6416ab Mon Sep 17 00:00:00 2001
From: Shin'ya Ueoka <ueokande@i-beam.org>
Date: Sun, 4 Apr 2021 16:44:47 +0900
Subject: Separate Message to InfoMessage and ErrorMessage

---
 test/console/components/ErrorMessage.test.tsx | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 test/console/components/ErrorMessage.test.tsx

(limited to 'test/console/components/ErrorMessage.test.tsx')

diff --git a/test/console/components/ErrorMessage.test.tsx b/test/console/components/ErrorMessage.test.tsx
new file mode 100644
index 0000000..46ec0b0
--- /dev/null
+++ b/test/console/components/ErrorMessage.test.tsx
@@ -0,0 +1,17 @@
+import React from "react";
+import ReactTestRenderer from "react-test-renderer";
+import { expect } from "chai";
+import ErrorMessage from "../../../src/console/components/ErrorMessage";
+
+describe("console/components/console/completion/ErrorMessage", () => {
+  it("renders an error message", () => {
+    const root = ReactTestRenderer.create(
+      <ErrorMessage mode="error">Hello!</ErrorMessage>
+    ).root;
+
+    const p = root.findByType("p");
+
+    expect(p.props["role"]).to.equal("alert");
+    expect(p.children).to.deep.equal(["Hello!"]);
+  });
+});
-- 
cgit v1.2.3

