Skip to content

Commit

Permalink
linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinashe-Austin committed Jul 2, 2024
1 parent 3b925e4 commit cd7ac44
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, test, afterEach, mock } from "bun:test";
import { render, screen, cleanup, fireEvent } from "@testing-library/react";
import { describe, expect, test, afterEach } from "bun:test";
import { render, screen, cleanup } from "@testing-library/react";
import { Line_Chart } from "@components/index";


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test("Tab component renders all three tabs", () => {
});

test("Clicking on a tab calls setSelectedTab with correct argument", () => {
const mockSetSelectedTab = mock((arg: string) => {});
const mockSetSelectedTab = mock((arg: string) => {arg.toLowerCase()});
render(<TabComponent setSelectedTab={mockSetSelectedTab} />);

const bookingsTab = screen.getByText('Bookings');
Expand Down
22 changes: 11 additions & 11 deletions frontend/occupi-web/src/pages/Login/client.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { client } from '@passwordless-id/webauthn'
// import { client } from '@passwordless-id/webauthn'

await client.isLocalAuthenticator()
const challenge = "a7c61ef9-dc23-4806-b486-2428938a547e"
const registration = await client.register("Arnaud", challenge, {
authenticatorType: "auto",
userVerification: "required",
timeout: 60000,
attestation: true,
userHandle: "Optional server-side user id. Must not reveal personal information.",
debug: false,
// await client.isLocalAuthenticator()
// const challenge = "a7c61ef9-dc23-4806-b486-2428938a547e"
// const registration = await client.register("Arnaud", challenge, {
// authenticatorType: "auto",
// userVerification: "required",
// timeout: 60000,
// attestation: true,
// userHandle: "Optional server-side user id. Must not reveal personal information.",
// debug: false,

})
// })
20 changes: 10 additions & 10 deletions frontend/occupi-web/src/pages/Login/server.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { server } from "@passwordless-id/webauthn";
// import { server } from "@passwordless-id/webauthn";

const expected = {
challenge: "a7c61ef9-dc23-4806-b486-2428938a547e", // whatever was randomly generated by the server
origin: "http://localhost:5173",
};
const registration: any = undefined; // declare the 'registration' variable
const registrationParsed = await server.verifyRegistration(
registration,
expected
);
// const expected = {
// challenge: "a7c61ef9-dc23-4806-b486-2428938a547e", // whatever was randomly generated by the server
// origin: "http://localhost:5173",
// };
// const registration: any = undefined; // declare the 'registration' variable
// const registrationParsed = await server.verifyRegistration(
// registration,
// expected
// );

0 comments on commit cd7ac44

Please sign in to comment.