Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
Single quotes to double quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
igorweber committed Nov 24, 2023
1 parent 0640a17 commit 3dfcf57
Show file tree
Hide file tree
Showing 156 changed files with 2,069 additions and 2,069 deletions.
24 changes: 12 additions & 12 deletions server/server.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
const express = require('express');
const compression = require('compression');
const express = require("express");
const compression = require("compression");
const {
injectDecoratorServerSide
} = require('@navikt/nav-dekoratoren-moduler/ssr');
const { logger, logRequests } = require('./logger');
const path = require('path');
const promMid = require('express-prometheus-middleware');
} = require("@navikt/nav-dekoratoren-moduler/ssr");
const { logger, logRequests } = require("./logger");
const path = require("path");
const promMid = require("express-prometheus-middleware");

console.log(`Dekoratormiljø: ${process.env.DEKORATOR_MILJO}`);

const port = process.env.PORT || 8080;
const basePath = '/meldekort';
const buildPath = path.resolve(__dirname, '../build');
const basePath = "/meldekort";
const buildPath = path.resolve(__dirname, "../build");

const app = express();

// Gzip responser
app.use(compression());

// Sikkerhetsgreier
app.disable('x-powered-by');
app.disable("x-powered-by");

// basePath viser ingenting, derfor må vi redirect brukere til ${basePath}/send-meldekort
app.get(`${basePath}`, (req, res) =>
res.redirect(`${basePath}/send-meldekort`)
);

// Cache public-filer (som favicon) i én time
app.use(basePath, express.static('public', { maxAge: '1h' }));
app.use(basePath, express.static("public", { maxAge: "1h" }));

app.use(basePath, express.static(buildPath, { index: false }));

Expand All @@ -45,7 +45,7 @@ app.use(

app.get(/^(?!.*\/(internal|static)\/).*$/, (req, res) => {
injectDecoratorServerSide({
env: process.env.DEKORATOR_MILJO ?? 'dev',
env: process.env.DEKORATOR_MILJO ?? "dev",
filePath: `${buildPath}/index.html`,
params: {
simple: false,
Expand All @@ -60,7 +60,7 @@ app.get(/^(?!.*\/(internal|static)\/).*$/, (req, res) => {
console.error(`Failed to get decorator: ${e}`);
res
.status(500)
.send('Det har oppstått en feil. Venligst prøv igjen senere.');
.send("Det har oppstått en feil. Venligst prøv igjen senere.");
});
});

Expand Down
10 changes: 5 additions & 5 deletions src/__test__/components/DOMPortal.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import ProviderWrapper from '../testSetup/providerWrapper';
import DOMPortal from '../../app/components/print/DOMPortal';
import * as React from "react";
import * as renderer from "react-test-renderer";
import ProviderWrapper from "../testSetup/providerWrapper";
import DOMPortal from "../../app/components/print/DOMPortal";

it('DOMPortal', () => {
it("DOMPortal", () => {
const tree = renderer.create(
<ProviderWrapper>
<DOMPortal />
Expand Down
8 changes: 4 additions & 4 deletions src/__test__/components/EngelskFlaggSVG.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import EngelskFlaggSVG from '../../app/components/sprakvelger/EngelskFlaggSVG';
import * as React from "react";
import * as renderer from "react-test-renderer";
import EngelskFlaggSVG from "../../app/components/sprakvelger/EngelskFlaggSVG";

it('EngelskFlaggSVG', () => {
it("EngelskFlaggSVG", () => {
const tree = renderer.create(<EngelskFlaggSVG />);
expect(tree).toMatchSnapshot();
});
8 changes: 4 additions & 4 deletions src/__test__/components/NorskFlaggSVG.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import NorskFlaggSVG from '../../app/components/sprakvelger/NorskFlaggSVG';
import * as React from "react";
import * as renderer from "react-test-renderer";
import NorskFlaggSVG from "../../app/components/sprakvelger/NorskFlaggSVG";

it('NorskFlaggSVG', () => {
it("NorskFlaggSVG", () => {
const tree = renderer.create(<NorskFlaggSVG />);
expect(tree).toMatchSnapshot();
});
10 changes: 5 additions & 5 deletions src/__test__/components/UIAlertstripeWrapper.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import ProviderWrapper from '../testSetup/providerWrapper';
import UIAlertstripeWrapper from '../../app/components/feil/UIAlertstripeWrapper';
import * as React from "react";
import * as renderer from "react-test-renderer";
import ProviderWrapper from "../testSetup/providerWrapper";
import UIAlertstripeWrapper from "../../app/components/feil/UIAlertstripeWrapper";

it('UIAlertstripeWrapper', () => {
it("UIAlertstripeWrapper", () => {
const tree = renderer.create(
<ProviderWrapper>
<UIAlertstripeWrapper />
Expand Down
12 changes: 6 additions & 6 deletions src/__test__/components/UIModalWrapper.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as React from 'react';
import Enzyme, { shallow } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import ProviderWrapper from '../testSetup/providerWrapper';
import UIModalWrapper from '../../app/components/modal/UIModalWrapper';
import * as React from "react";
import Enzyme, { shallow } from "enzyme";
import Adapter from "@wojtekmaj/enzyme-adapter-react-17";
import ProviderWrapper from "../testSetup/providerWrapper";
import UIModalWrapper from "../../app/components/modal/UIModalWrapper";

Enzyme.configure({ adapter: new Adapter() });

it('UIModalWrapper', () => {
it("UIModalWrapper", () => {
const tree = shallow(
<ProviderWrapper>
<div id="meldekort__root">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { baksystemFeilmeldingContent } from '../../app/components/feil/baksystemFeilmeldingContent';
import { baksystemFeilmeldingContent } from "../../app/components/feil/baksystemFeilmeldingContent";

it('BaksystemFeilmeldingContent', () => {
it("BaksystemFeilmeldingContent", () => {
expect(baksystemFeilmeldingContent()).toMatchSnapshot();
});
14 changes: 7 additions & 7 deletions src/__test__/components/begrunnelse.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as React from 'react';
import Enzyme, { shallow } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import ProviderWrapper from '../testSetup/providerWrapper';
import BegrunnelseVisning from '../../app/components/meldekortdetaljer/begrunnelsevisning/begrunnelse';
import * as React from "react";
import Enzyme, { shallow } from "enzyme";
import Adapter from "@wojtekmaj/enzyme-adapter-react-17";
import ProviderWrapper from "../testSetup/providerWrapper";
import BegrunnelseVisning from "../../app/components/meldekortdetaljer/begrunnelsevisning/begrunnelse";

Enzyme.configure({ adapter: new Adapter() });

it('BegrunnelseVelger', () => {
it("BegrunnelseVelger", () => {
const tree = shallow(
<ProviderWrapper>
<BegrunnelseVisning begrunnelse={'TEST'} />
<BegrunnelseVisning begrunnelse={"TEST"} />
</ProviderWrapper>
);
expect(tree).toMatchSnapshot();
Expand Down
10 changes: 5 additions & 5 deletions src/__test__/components/ekspanderbartInnhold.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import ProviderWrapper from '../testSetup/providerWrapper';
import EkspanderbartInnhold from '../../app/components/ekspanderbartInnhold/ekspanderbartInnhold';
import * as React from "react";
import * as renderer from "react-test-renderer";
import ProviderWrapper from "../testSetup/providerWrapper";
import EkspanderbartInnhold from "../../app/components/ekspanderbartInnhold/ekspanderbartInnhold";

it('EkspanderbartInnhold', () => {
it("EkspanderbartInnhold", () => {
const tree = renderer.create(
<ProviderWrapper>
<EkspanderbartInnhold children={<span>Test</span>} />
Expand Down
10 changes: 5 additions & 5 deletions src/__test__/components/feilside.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import ProviderWrapper, { setLocalesBeforeAll } from '../testSetup/providerWrapper';
import Feilside from '../../app/components/feilside/feilside';
import * as React from "react";
import * as renderer from "react-test-renderer";
import ProviderWrapper, { setLocalesBeforeAll } from "../testSetup/providerWrapper";
import Feilside from "../../app/components/feilside/feilside";

setLocalesBeforeAll();

it('Feilside', () => {
it("Feilside", () => {
const tree = renderer.create(
<ProviderWrapper>
<Feilside />
Expand Down
14 changes: 7 additions & 7 deletions src/__test__/components/header.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as React from 'react';
import Enzyme, { shallow } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import ProviderWrapper from '../testSetup/providerWrapper';
import Header from '../../app/components/header/header';
import * as React from "react";
import Enzyme, { shallow } from "enzyme";
import Adapter from "@wojtekmaj/enzyme-adapter-react-17";
import ProviderWrapper from "../testSetup/providerWrapper";
import Header from "../../app/components/header/header";

Enzyme.configure({ adapter: new Adapter() });

it('Header', () => {
it("Header", () => {
const tree = shallow(
<ProviderWrapper>
<Header tittel={'TEST'} />
<Header tittel={"TEST"} />
</ProviderWrapper>
);

Expand Down
14 changes: 7 additions & 7 deletions src/__test__/components/hjelpetekst.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import ProviderWrapper, { setLocalesBeforeAll } from '../testSetup/providerWrapper';
import Hjelpetekst from '../../app/components/meldekortdetaljer/ukevisning/hjelpetekst';
import { mkDagTEST } from '../testSetup/testData';
import { TypeYtelse } from '../../app/utils/teksterUtil';
import * as React from "react";
import * as renderer from "react-test-renderer";
import ProviderWrapper, { setLocalesBeforeAll } from "../testSetup/providerWrapper";
import Hjelpetekst from "../../app/components/meldekortdetaljer/ukevisning/hjelpetekst";
import { mkDagTEST } from "../testSetup/testData";
import { TypeYtelse } from "../../app/utils/teksterUtil";

setLocalesBeforeAll();

it('Hjelpetekst', () => {
it("Hjelpetekst", () => {
const tree = renderer.create(
<ProviderWrapper>
<Hjelpetekst
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ikkeFortsetteRegistrertContent } from '../../app/components/modal/ikkeFortsetteRegistrertContent';
import { ikkeFortsetteRegistrertContent } from "../../app/components/modal/ikkeFortsetteRegistrertContent";

it('ikkeFortsetteRegistrertContent', () => {
it("ikkeFortsetteRegistrertContent", () => {
expect(ikkeFortsetteRegistrertContent()).toMatchSnapshot();
});
10 changes: 5 additions & 5 deletions src/__test__/components/infoToggler.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import ProviderWrapper from '../testSetup/providerWrapper';
import InfoToggler from '../../app/components/utvidetinformasjon/infoToggler/infoToggler';
import * as React from "react";
import * as renderer from "react-test-renderer";
import ProviderWrapper from "../testSetup/providerWrapper";
import InfoToggler from "../../app/components/utvidetinformasjon/infoToggler/infoToggler";

it('InfoToggler', () => {
it("InfoToggler", () => {
const tree = renderer.create(
<ProviderWrapper>
<InfoToggler
Expand Down
18 changes: 9 additions & 9 deletions src/__test__/components/meldekortdetaljer.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import * as React from 'react';
import Enzyme, { shallow } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import ProviderWrapper from '../testSetup/providerWrapper';
import Meldekortdetaljer from '../../app/components/meldekortdetaljer/meldekortdetaljer';
import { mkDetaljerTEST, mkTEST } from '../testSetup/testData';
import { TypeYtelse } from '../../app/utils/teksterUtil';
import * as React from "react";
import Enzyme, { shallow } from "enzyme";
import Adapter from "@wojtekmaj/enzyme-adapter-react-17";
import ProviderWrapper from "../testSetup/providerWrapper";
import Meldekortdetaljer from "../../app/components/meldekortdetaljer/meldekortdetaljer";
import { mkDetaljerTEST, mkTEST } from "../testSetup/testData";
import { TypeYtelse } from "../../app/utils/teksterUtil";

Enzyme.configure({ adapter: new Adapter() });

it('Meldekortdetaljer', () => {
it("Meldekortdetaljer", () => {
const tree = shallow(
<ProviderWrapper initialStateName={'aktivtMeldekort'} initialState={mkTEST}>
<ProviderWrapper initialStateName={"aktivtMeldekort"} initialState={mkTEST}>
<Meldekortdetaljer
aktivtMeldekort={mkTEST}
typeYtelsePostfix={TypeYtelse.AAP}
Expand Down
14 changes: 7 additions & 7 deletions src/__test__/components/mobilMeny.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as React from 'react';
import Enzyme, { shallow } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import ProviderWrapper from '../testSetup/providerWrapper';
import MobilMeny from '../../app/components/meny/mobil/mobilMeny';
import { menyPunkterTEST } from '../testSetup/testData';
import * as React from "react";
import Enzyme, { shallow } from "enzyme";
import Adapter from "@wojtekmaj/enzyme-adapter-react-17";
import ProviderWrapper from "../testSetup/providerWrapper";
import MobilMeny from "../../app/components/meny/mobil/mobilMeny";
import { menyPunkterTEST } from "../testSetup/testData";

Enzyme.configure({ adapter: new Adapter() });

it('MobilMeny', () => {
it("MobilMeny", () => {
const tree = shallow(
<ProviderWrapper>
<MobilMeny menypunkter={menyPunkterTEST} />
Expand Down
10 changes: 5 additions & 5 deletions src/__test__/components/mobilMenyToggle.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import ProviderWrapper from '../testSetup/providerWrapper';
import MobilMenyToggle from '../../app/components/meny/mobil/mobilmenyToggle';
import * as React from "react";
import * as renderer from "react-test-renderer";
import ProviderWrapper from "../testSetup/providerWrapper";
import MobilMenyToggle from "../../app/components/meny/mobil/mobilmenyToggle";

it('MobilMenyToggle', () => {
it("MobilMenyToggle", () => {
const tree = renderer.create(
<ProviderWrapper>
<MobilMenyToggle />
Expand Down
12 changes: 6 additions & 6 deletions src/__test__/components/mobilTabell.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import ProviderWrapper from '../testSetup/providerWrapper';
import MobilTabell from '../../app/components/tabell/mobil/mobilTabell';
import * as React from "react";
import * as renderer from "react-test-renderer";
import ProviderWrapper from "../testSetup/providerWrapper";
import MobilTabell from "../../app/components/tabell/mobil/mobilTabell";

it('MobilTabell', () => {
it("MobilTabell", () => {
const tree = renderer.create(
<ProviderWrapper>
<MobilTabell
columns={[
{
key: 'test',
key: "test",
label: <span>TEST</span>,
},
]}
Expand Down
14 changes: 7 additions & 7 deletions src/__test__/components/periodeBanner.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import PeriodeBanner from '../../app/components/periodeBanner/periodeBanner';
import ProviderWrapper, { setLocalesBeforeAll } from '../testSetup/providerWrapper';
import { mkTEST } from '../testSetup/testData';
import * as React from "react";
import * as renderer from "react-test-renderer";
import PeriodeBanner from "../../app/components/periodeBanner/periodeBanner";
import ProviderWrapper, { setLocalesBeforeAll } from "../testSetup/providerWrapper";
import { mkTEST } from "../testSetup/testData";

setLocalesBeforeAll();

it('PeriodeBanner', () => {
it("PeriodeBanner", () => {
const tree = renderer.create(
<ProviderWrapper initialStateName={'aktivtMeldekort'} initialState={mkTEST}>
<ProviderWrapper initialStateName={"aktivtMeldekort"} initialState={mkTEST}>
<PeriodeBanner />
</ProviderWrapper>
);
Expand Down
12 changes: 6 additions & 6 deletions src/__test__/components/printKnapp.snapshot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import ProviderWrapper, { setLocalesBeforeAll } from '../testSetup/providerWrapper';
import PrintKnapp from '../../app/components/print/printKnapp';
import { testPerson, testPersoninfo } from '../testSetup/testData';
import * as React from "react";
import * as renderer from "react-test-renderer";
import ProviderWrapper, { setLocalesBeforeAll } from "../testSetup/providerWrapper";
import PrintKnapp from "../../app/components/print/printKnapp";
import { testPerson, testPersoninfo } from "../testSetup/testData";

setLocalesBeforeAll();

it('PrintKnapp', () => {
it("PrintKnapp", () => {
const tree = renderer.create(
<ProviderWrapper>
<PrintKnapp
Expand Down
Loading

0 comments on commit 3dfcf57

Please sign in to comment.