diff --git a/packages/api-explorer/__tests__/GlossaryItem.test.jsx b/packages/api-explorer/__tests__/GlossaryItem.test.jsx
new file mode 100644
index 000000000..3d87e0f2c
--- /dev/null
+++ b/packages/api-explorer/__tests__/GlossaryItem.test.jsx
@@ -0,0 +1,27 @@
+const React = require('react');
+const { shallow } = require('enzyme');
+
+const GlossaryItem = require('../src/GlossaryItem');
+
+test('should output a glossary item if the term exists', () => {
+ const term = 'acme';
+ const definition = 'This is a definition';
+ const glossaryItem = shallow(
+ ,
+ );
+
+ expect(glossaryItem.find('.glossary-item.highlight').text()).toBe(term);
+ expect(glossaryItem.find('.tooltip-content-body').text()).toBe(`- ${term} - ${definition}`);
+});
+
+test('should output nothing if the term does not exist', () => {
+ expect(shallow(
+ ,
+ ).html()).toBe(null);
+});
diff --git a/packages/api-explorer/__tests__/block-types/TextArea.test.jsx b/packages/api-explorer/__tests__/block-types/TextArea.test.jsx
index 1f2d4962f..68cdb636d 100644
--- a/packages/api-explorer/__tests__/block-types/TextArea.test.jsx
+++ b/packages/api-explorer/__tests__/block-types/TextArea.test.jsx
@@ -9,6 +9,6 @@ describe('TextArea', () => {
text: 'this is text',
};
const textArea = shallow();
- expect(textArea.text()).toBe(block.text);
+ expect(textArea.find('p').text()).toBe(block.text);
});
});
diff --git a/packages/api-explorer/__tests__/block-types/__snapshots__/CallOut.test.jsx.snap b/packages/api-explorer/__tests__/block-types/__snapshots__/CallOut.test.jsx.snap
index 201b8c248..36f1308c1 100644
--- a/packages/api-explorer/__tests__/block-types/__snapshots__/CallOut.test.jsx.snap
+++ b/packages/api-explorer/__tests__/block-types/__snapshots__/CallOut.test.jsx.snap
@@ -1,8 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`should render body 1`] = `"
"`;
+exports[`should render body 1`] = `"body
"`;
exports[`should render markdown in body 1`] = `
-""
+"
+test
"
`;
diff --git a/packages/api-explorer/__tests__/lib/markdown/renderer.test.js b/packages/api-explorer/__tests__/lib/markdown/renderer.test.js
deleted file mode 100644
index 45beedcaa..000000000
--- a/packages/api-explorer/__tests__/lib/markdown/renderer.test.js
+++ /dev/null
@@ -1,45 +0,0 @@
-const renderer = require('../../../src/lib/markdown/renderer.js');
-
-describe('renderer link', () => {
- it('should return a tag with title, href, and text', () => {
- expect(
- renderer.link(
- '/v1.0/docs/getting-started',
- 'Getting Started',
- 'Getting started with petstore swagger',
- ),
- ).toBe(
- 'Getting started with petstore swagger',
- );
- });
-
- it('should return a tag with text and href', () => {
- expect(
- renderer.link('/v1.0/blog/getting-started', '', 'Getting started with petstore swagger'),
- ).toBe(
- 'Getting started with petstore swagger',
- );
- });
-
- it('should return a tag with href', () => {
- expect(renderer.link('/v1.0/page/getting-started', '', '')).toBe(
- '',
- );
- });
-
- it('should convert doc:doc to /docs/doc', () => {
- expect(renderer.link('doc:doc', '', '')).toBe(
- '',
- );
- });
-
- it('should convert blog:blog to /blog/blog', () => {
- expect(renderer.link('blog:blog', '', '')).toBe('');
- });
-
- it('should convert page:custompage to /blog/blog', () => {
- expect(renderer.link('page:custompage', '', '')).toBe(
- '',
- );
- });
-});