From 1fc8cb2f63acbe36927e5313972ab4418536c3c7 Mon Sep 17 00:00:00 2001
From: lsprr <16653744+lsprr@users.noreply.github.com>
Date: Mon, 26 Feb 2024 12:57:46 -0500
Subject: [PATCH] test: switch line tests to react testing library
---
.../react/__tests__/src/components/Line/index.js | 14 --------------
.../react/src/components/Line/index.test.tsx | 16 ++++++++++++++++
2 files changed, 16 insertions(+), 14 deletions(-)
delete mode 100644 packages/react/__tests__/src/components/Line/index.js
create mode 100644 packages/react/src/components/Line/index.test.tsx
diff --git a/packages/react/__tests__/src/components/Line/index.js b/packages/react/__tests__/src/components/Line/index.js
deleted file mode 100644
index 92a948854..000000000
--- a/packages/react/__tests__/src/components/Line/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import React from 'react';
-import { shallow } from 'enzyme';
-import Line from '../../../../src/components/Line';
-import axe from '../../../axe';
-
-test('passes classNames through', () => {
- const link = shallow();
- expect(link.is('.baz')).toBe(true);
-});
-
-test('should return no axe violations', async () => {
- const link = shallow();
- expect(await axe(link.html())).toHaveNoViolations();
-});
diff --git a/packages/react/src/components/Line/index.test.tsx b/packages/react/src/components/Line/index.test.tsx
new file mode 100644
index 000000000..45c19788c
--- /dev/null
+++ b/packages/react/src/components/Line/index.test.tsx
@@ -0,0 +1,16 @@
+import React from 'react';
+import { render } from '@testing-library/react';
+import Line from '../../../src/components/Line';
+import axe from '../../axe';
+
+test('passes classNames through', () => {
+ const { container } = render();
+ expect(container.firstChild).toHaveClass('baz');
+});
+
+test('should return no axe violations', async () => {
+ const { container } = render();
+
+ const results = await axe(container);
+ expect(results).toHaveNoViolations();
+});