Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(site): remove some eslint-disables#4265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jsjoeio merged 6 commits intomainfromjsjoeio/site-fixes
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions.vscode/settings.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,6 +25,7 @@
"drpcserver",
"Dsts",
"enablements",
"eventsourcemock",
"fatih",
"Formik",
"gitsshkey",
Expand Down
4 changes: 1 addition & 3 deletionssite/src/pages/UsersPage/UsersPage.test.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-floating-promises */
import { fireEvent, screen, waitFor, within } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
import { i18n } from "i18n"
Expand DownExpand Up@@ -474,8 +473,7 @@ describe("UsersPage", () => {
}),
)

// eslint-disable-next-line @typescript-eslint/no-empty-function
await updateUserRole(() => {}, MockAuditorRole)
await updateUserRole(() => null, MockAuditorRole)

// Check if the error message is displayed
const errorMessage = await screen.findByText("message from the backend")
Expand Down
17 changes: 12 additions & 5 deletionssite/src/pages/WorkspacePage/WorkspacePage.test.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-floating-promises */
import { fireEvent, screen, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
importEventSource from "eventsourcemock"
importEventSourceMock from "eventsourcemock"
import i18next from "i18next"
import { rest } from "msw"
import * as api from "../../api/api"
Expand DownExpand Up@@ -70,13 +70,20 @@ const testStatus = async (ws: Workspace, label: string) => {
expect(status).toHaveTextContent(label)
}

let originalEventSource: typeof window.EventSource

beforeAll(() => {
originalEventSource = window.EventSource
// mocking out EventSource for SSE
window.EventSource = EventSourceMock
})

beforeEach(() => {
jest.resetAllMocks()
})

// mocking out EventSource for SSE
Object.defineProperty(window, "EventSource", {
value: EventSource,
})
afterAll(() => {
window.EventSource = originalEventSource
})

describe("WorkspacePage", () => {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp