|
@@ -0,0 +1,46 @@
|
|
1
|
+//import '@testing-library/jest-dom'
|
|
2
|
+// NOTE: jest-dom adds handy assertions to Jest and is recommended, but not required
|
|
3
|
+
|
|
4
|
+import * as React from 'react'
|
|
5
|
+//import React from 'react';
|
|
6
|
+import {render, fireEvent, screen} from '@testing-library/react'
|
|
7
|
+import '@testing-library/jest-dom/extend-expect'
|
|
8
|
+//import { render } from "@testing-library/react";
|
|
9
|
+//import LoginForm from '../index';
|
|
10
|
+import App from '../App.jsx'
|
|
11
|
+//import Home from "../pages/Home";
|
|
12
|
+
|
|
13
|
+/*describe("Home", () => {
|
|
14
|
+ test("renders Home component", () => {
|
|
15
|
+ render(<Home />);
|
|
16
|
+ });
|
|
17
|
+});*/
|
|
18
|
+
|
|
19
|
+describe("App", () => {
|
|
20
|
+ test("renders App component", () => {
|
|
21
|
+ render(<App />);
|
|
22
|
+ });
|
|
23
|
+});
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+//test('shows the children when the checkbox is checked', () => {
|
|
27
|
+// const testMessage = 'Test Message';
|
|
28
|
+// render(<LoginForm />);
|
|
29
|
+
|
|
30
|
+ // query* functions will return the element or null if it cannot be found
|
|
31
|
+ // get* functions will return the element or throw an error if it cannot be found
|
|
32
|
+ //expect(screen.queryByText(testMessage)).toBeNull()
|
|
33
|
+
|
|
34
|
+ // the queries can accept a regex to make your selectors more resilient to content tweaks and changes.
|
|
35
|
+ //fireEvent.click(screen.getByLabelText(/show/i))
|
|
36
|
+
|
|
37
|
+ // .toBeInTheDocument() is an assertion that comes from jest-dom
|
|
38
|
+ // otherwise you could use .toBeDefined()
|
|
39
|
+ //expect(screen.getByText(testMessage)).toBeInTheDocument()
|
|
40
|
+//})
|
|
41
|
+
|
|
42
|
+/*describe('My Test Suite', () => {
|
|
43
|
+ it('My Test Case', () => {
|
|
44
|
+ expect(true).toEqual(true);
|
|
45
|
+ });
|
|
46
|
+});*/
|