Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
andersrognstad committed Jun 3, 2024
1 parent faadfba commit ec85364
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion test/api/apiTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { get } from "@/api/axios";
import MockAdapter from "axios-mock-adapter";
import { Tilgang } from "@/data/tilgang/tilgangTypes";
import { ApiErrorException, defaultErrorTexts, ErrorType } from "@/api/errors";
import { describe, expect, it, beforeAll } from 'vitest'
import { describe, expect, it, beforeAll } from "vitest";

let stub: MockAdapter;

Expand Down
2 changes: 1 addition & 1 deletion test/components/FastlegeContainerTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import nock from "nock";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { render, screen } from "@testing-library/react";
import { testQueryClient } from "../testQueryClient";
import { describe, expect, it, beforeEach, afterEach } from 'vitest'
import { describe, expect, it, beforeEach, afterEach } from "vitest";

let queryClient: QueryClient;
let apiMockScope: nock.Scope;
Expand Down
2 changes: 1 addition & 1 deletion test/components/FastlegeTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { FASTLEGEREST_ROOT } from "@/api/constants";
import { Fastlege, texts } from "@/components/Fastlege";
import nock from "nock";
import { testQueryClient } from "../testQueryClient";
import { describe, expect, it, beforeEach, afterEach } from 'vitest'
import { describe, expect, it, beforeEach, afterEach } from "vitest";

const fnr = "01117302624";

Expand Down
18 changes: 13 additions & 5 deletions test/utils/fnrValideringUtilsTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { erGyldigFodselsnummer } from "@/utils/fnrValideringUtil";
import { describe, expect, it, vi, beforeEach } from 'vitest'
import { describe, expect, it, vi, beforeEach } from "vitest";

describe("fnrValideringsUtils", () => {
describe("erGyldigFodselsnummer in prod", () => {
Expand Down Expand Up @@ -101,7 +101,9 @@ describe("fnrValideringsUtils", () => {
vi.restoreAllMocks();
});
it("return true if valid NAV synthetic fnr (add 40 to month)", () => {
vi.stubGlobal("window", { location: { href: "https://intern.dev.nav.no" } });
vi.stubGlobal("window", {
location: { href: "https://intern.dev.nav.no" },
});
const fnr = "15507600333";

const isValidFnr = erGyldigFodselsnummer(fnr);
Expand All @@ -110,7 +112,9 @@ describe("fnrValideringsUtils", () => {
});

it("return true if valid NAV synthetic dnr (add 40 to month)", () => {
vi.stubGlobal("window", { location: { href: "https://intern.dev.nav.no" } });
vi.stubGlobal("window", {
location: { href: "https://intern.dev.nav.no" },
});
const fnr = "55507608360";

const isValidFnr = erGyldigFodselsnummer(fnr);
Expand All @@ -119,7 +123,9 @@ describe("fnrValideringsUtils", () => {
});

it("return true if valid Skatteetaten synthetic fnr (add 80 to month)", () => {
vi.stubGlobal("window", { location: { href: "https://intern.dev.nav.no" } });
vi.stubGlobal("window", {
location: { href: "https://intern.dev.nav.no" },
});
const fnr = "17912099997";

const isValidFnr = erGyldigFodselsnummer(fnr);
Expand All @@ -128,7 +134,9 @@ describe("fnrValideringsUtils", () => {
});

it("return true if valid Skatteetaten synthetic dnr (add 80 to month)", () => {
vi.stubGlobal("window", { location: { href: "https://intern.dev.nav.no" } });
vi.stubGlobal("window", {
location: { href: "https://intern.dev.nav.no" },
});
const fnr = "57912075186";

const isValidFnr = erGyldigFodselsnummer(fnr);
Expand Down
6 changes: 2 additions & 4 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ import { defineConfig } from "vitest/config";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
plugins: [
tsconfigPaths(),
],
plugins: [tsconfigPaths()],
test: {
globals: true,
environment: "jsdom",
include: ["test/**/*{test,Test}.*"],
},
});
});

0 comments on commit ec85364

Please sign in to comment.