Skip to content

Commit

Permalink
chore: Fix eslint command
Browse files Browse the repository at this point in the history
  • Loading branch information
javierbrea committed Aug 20, 2023
1 parent 6bcc8da commit b7f5d79
Show file tree
Hide file tree
Showing 3 changed files with 188 additions and 19 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-node-resolve": "13.3.0",
"@rollup/plugin-typescript": "8.5.0",
"@swc/core": "1.3.10",
"@testing-library/cypress": "8.0.3",
"@types/fs-extra": "11.0.1",
"@types/json-schema": "7.0.11",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Unless required by applicable law or agreed to in writing, software distributed
const sinon = require("sinon");

const CoreMocks = require("../../Core.mocks.js");
const { VariantHandlerFile: File } = require("../../../../src/variant-handlers/handlers/File");
const { VariantHandlerFile: VHFile } = require("../../../../src/variant-handlers/handlers/File");

describe("File variant handler", () => {
const FOO_VARIANT = {
Expand Down Expand Up @@ -40,7 +40,7 @@ describe("File variant handler", () => {
};
coreMocks = new CoreMocks();
coreInstance = coreMocks.stubs.instance;
routesHandler = new File(FOO_VARIANT, coreInstance);
routesHandler = new VHFile(FOO_VARIANT, coreInstance);
});

afterEach(() => {
Expand All @@ -50,13 +50,13 @@ describe("File variant handler", () => {

describe("id", () => {
it("should have file value", () => {
expect(File.id).toEqual("file");
expect(VHFile.id).toEqual("file");
});
});

describe("validationSchema", () => {
it("should be defined", () => {
expect(File.validationSchema).toBeDefined();
expect(VHFile.validationSchema).toBeDefined();
});
});

Expand All @@ -78,7 +78,7 @@ describe("File variant handler", () => {

it("should add headers if they are defined", () => {
const FOO_HEADERS = { foo: "foo" };
routesHandler = new File({ ...FOO_VARIANT, headers: FOO_HEADERS }, coreInstance);
routesHandler = new VHFile({ ...FOO_VARIANT, headers: FOO_HEADERS }, coreInstance);
routesHandler.middleware(expressStubs.req, expressStubs.res, expressStubs.next);

expect(expressStubs.res.set.getCall(0).args[0]).toEqual(FOO_HEADERS);
Expand Down
196 changes: 182 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b7f5d79

Please sign in to comment.