Merge branch 'main' into renovate/docker-build-push-action-6.x
Build image / build (pull_request) Failing after 4m39s
Details
Build image / build (pull_request) Failing after 4m39s
Details
This commit is contained in:
commit
2f7acd6bb1
|
@ -1 +1,2 @@
|
|||
node_modules
|
||||
node_modules/
|
||||
dist/
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
env: { browser: true, es2020: true },
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
],
|
||||
ignorePatterns: ["dist", ".eslintrc.cjs"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: ["react-refresh"],
|
||||
rules: {
|
||||
"react-refresh/only-export-components": [
|
||||
"warn",
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
},
|
||||
};
|
|
@ -1,3 +0,0 @@
|
|||
import { GlobalRegistrator } from "@happy-dom/global-registrator";
|
||||
|
||||
GlobalRegistrator.register();
|
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
|
@ -5,8 +5,7 @@
|
|||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "docker compose down -v && docker compose watch",
|
||||
"build": "tsc && vite build",
|
||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
|
||||
"build": "tsc && vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.2.0",
|
||||
|
@ -15,17 +14,8 @@
|
|||
"vite": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@happy-dom/global-registrator": "^13.6.2",
|
||||
"@testing-library/jest-dom": "^6.4.2",
|
||||
"@testing-library/react": "^14.2.1",
|
||||
"@types/react": "^18.2.43",
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
||||
"@typescript-eslint/parser": "^6.14.0",
|
||||
"@vitejs/plugin-react-swc": "^3.5.0",
|
||||
"bun-types": "^1.0.29",
|
||||
"eslint": "^8.55.0",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.5"
|
||||
"@vitejs/plugin-react-swc": "^3.5.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { useState } from "react";
|
||||
import "./App.css";
|
||||
import ImageModerator from "./components/ImageModerator/ImageModerator";
|
||||
import Login from "./components/Login/Login";
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
import { render, screen } from "@testing-library/react";
|
||||
import { expect, it } from "bun:test";
|
||||
import React from "react";
|
||||
import ImageModerator, {
|
||||
ImageModeratorProps,
|
||||
} from "../../src/components/ImageModerator/ImageModerator";
|
||||
|
||||
const properties: ImageModeratorProps = {
|
||||
acceptLabel: "Accept",
|
||||
discardLabel: "Discard",
|
||||
};
|
||||
|
||||
it("should render into the document", () => {
|
||||
render(<ImageModerator {...properties} />);
|
||||
});
|
||||
|
||||
it("should show a new image when accept button is clicked", () => {
|
||||
const acceptButton = screen.getByText(properties.acceptLabel);
|
||||
const imgElement = screen.getByRole("img");
|
||||
const imgElementSrcBefore = imgElement.getAttribute("src");
|
||||
acceptButton.click();
|
||||
expect(imgElement.getAttribute("src")).not.toEqual(imgElementSrcBefore);
|
||||
});
|
||||
|
||||
it("should show a new image when discard button is clicked", () => {
|
||||
const discardButton = screen.getByText(properties.discardLabel);
|
||||
const imgElement = screen.getByRole("img");
|
||||
const imgElementSrcBefore = imgElement.getAttribute("src");
|
||||
discardButton.click();
|
||||
expect(imgElement.getAttribute("src")).not.toEqual(imgElementSrcBefore);
|
||||
});
|
Loading…
Reference in New Issue