Skip to content

Commit

Permalink
fix: tests for app
Browse files Browse the repository at this point in the history
Co-Authored-By: Joaovitor045 <joaovitoralvestf@gmail.com>
Co-Authored-By: gsVieiraaa <Gabriel.vieira.santos.110@gmail.com>
  • Loading branch information
3 people committed Dec 8, 2024
1 parent 5202fbe commit a21da9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 12 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
import "@testing-library/jest-dom";

if (
typeof globalThis.TextEncoder === "undefined" ||
typeof globalThis.TextDecoder === "undefined"
) {
const utils = require("util");
globalThis.TextEncoder = utils.TextEncoder;
globalThis.TextDecoder = utils.TextDecoder;
globalThis.Uint8Array = Uint8Array;
}

global.structuredClone = (val) => JSON.parse(JSON.stringify(val))
4 changes: 1 addition & 3 deletions test/App.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import React from "react";
import '@testing-library/jest-dom'
import { render } from "@testing-library/react"
import App from "../src/App"
test('demo', () => {
expect(true).toBe(true)
})

test("Renders the main page", () => {
render(<App />)
expect(true).toBeTruthy()
Expand Down

0 comments on commit a21da9c

Please sign in to comment.