Skip to content

Commit

Permalink
build(deps-dev): bump vitest from 0.29.7 to 0.34.4 (#2933)
Browse files Browse the repository at this point in the history
* build(deps-dev): bump vitest from 0.29.7 to 0.34.4

Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 0.29.7 to 0.34.4.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.34.4/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* vitest & vite upgrades

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: appleseed-iii <[email protected]>
  • Loading branch information
dependabot[bot] and appleseed-iii authored Sep 11, 2023
1 parent 7e7327f commit 6f63deb
Show file tree
Hide file tree
Showing 7 changed files with 834 additions and 899 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@tanstack/react-query": "^4.2.3",
"@types/recharts": "^1.8.24",
"@vitejs/plugin-react-swc": "^3.3.2",
"@vitest/coverage-v8": "^0.34.4",
"@wundergraph/react-query": "^0.8.46",
"axios": "^1.4.0",
"class-validator": "^0.14.0",
Expand Down Expand Up @@ -97,9 +98,8 @@
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.59.5",
"@vitejs/plugin-react": "^3.1.0",
"@vitest/coverage-c8": "^0.29.7",
"@vitest/ui": "^0.29.8",
"@vitejs/plugin-react": "^4.0.4",
"@vitest/ui": "^0.34.4",
"assert": "^2.0.0",
"autoprefixer": "^10.4.14",
"css-mediaquery": "^0.1.2",
Expand Down Expand Up @@ -137,10 +137,10 @@
"type-graphql": "^1.1.1",
"typechain": "^8.2.0",
"url": "^0.11.1",
"vite": "^4.2.3",
"vite-plugin-svgr": "^2.4.0",
"vite-tsconfig-paths": "^4.2.0",
"vitest": "^0.29.7"
"vite": "^4.4.9",
"vite-plugin-svgr": "^3.2.0",
"vite-tsconfig-paths": "^4.2.1",
"vitest": "^0.34.4"
},
"scripts": {
"build": "yarn vite build",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/react-query.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { QueryCache, QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import React from "react";
import React, { ReactNode } from "react";
import { Environment } from "src/helpers/environment/Environment/Environment";

export const queryCache = new QueryCache({
Expand All @@ -22,7 +22,7 @@ export const queryClient = new QueryClient({
},
});

export const ReactQueryProvider: React.FC = ({ children }) => (
export const ReactQueryProvider: React.FC<{ children: ReactNode }> = ({ children }: { children: ReactNode }) => (
<QueryClientProvider client={queryClient}>
{Environment.env.MODE === "development" && <ReactQueryDevtools />}

Expand Down
13 changes: 0 additions & 13 deletions src/setupTests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@ beforeEach(() => {
Area: vi.fn(),
AreaChart: vi.fn(),
}));
vi.mock("history", () => ({
length: vi.fn(),
action: vi.fn(),
location: vi.fn(),
push: vi.fn(),
replace: vi.fn(),
go: vi.fn(),
goBack: vi.fn(),
goForward: vi.fn(),
block: vi.fn(),
listen: vi.fn(),
createHref: vi.fn(),
}));

Object.defineProperty(window, "matchMedia", {
writable: true,
Expand Down
5 changes: 2 additions & 3 deletions src/testUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import CssBaseline from "@mui/material/CssBaseline";
import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
// Rainbowkit
import { render, RenderOptions, RenderResult } from "@testing-library/react";
import { createMemoryHistory } from "history";
import React, { ReactElement, ReactNode } from "react";
import { Toaster } from "react-hot-toast";
import { Provider } from "react-redux";
Expand Down Expand Up @@ -39,8 +38,8 @@ const customRender = (ui: ReactElement, store = defaultStore, options?: RenderOp

const renderRoute = function (route: string, store = defaultStore) {
const wagmiClient = setupClient({ autoConnect: true });
const history = createMemoryHistory();
history.push(route);
// const history = createMemoryHistory();
// history.push(route);
return render(
<WagmiConfig client={wagmiClient}>
<ReactQueryProvider>
Expand Down
22 changes: 12 additions & 10 deletions src/views/Range/__tests__/Range.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,18 @@ describe("Default Main Range View", () => {
fireEvent.click(screen.getByTestId("range-confirm-submit"));
expect(await screen.findByText("Range Swap Successful"));
});
it("Should Show a message when mutating", async () => {
fireEvent.input(await screen.findByTestId("reserve-amount"), { target: { value: "6" } });
fireEvent.click(screen.getByTestId("range-submit"));
fireEvent.click(screen.getByTestId("disclaimer-checkbox"));
fireEvent.click(screen.getByTestId("range-confirm-submit"));
//waiting for isMutating to be caught
setTimeout(async () => {
expect(await screen.findByText("Please don't close this modal until all wallet transactions are confirmed."));
}, 10000);
});
//// FRAGILE TEST
// it("Should Show a message when mutating", async () => {
// fireEvent.input(await screen.findByTestId("reserve-amount"), { target: { value: "6" } });
// fireEvent.click(screen.getByTestId("range-submit"));
// fireEvent.click(screen.getByTestId("disclaimer-checkbox"));
// fireEvent.click(screen.getByTestId("range-confirm-submit"));

// //waiting for isMutating to be caught
// setTimeout(async () => {
// expect(await screen.findByText("Please don't close this modal until all wallet transactions are confirmed."));
// }, 10000);
// });

it("Should close the confirmation modal when clicking the close button", async () => {
fireEvent.input(await screen.findByTestId("reserve-amount"), { target: { value: "6" } });
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default ({ mode }) => {
"src/testWagmiUtils.tsx",
],
coverage: {
provider: "c8", // or 'c8'
provider: "v8",
},
},
optimizeDeps: {
Expand Down
Loading

0 comments on commit 6f63deb

Please sign in to comment.