Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
API_HOST=https://apisandbox.openbankproject.com
CONSUMER_KEY=yourconsumerkey
CONSUMER_SECRET=yourconsumersecret
REDIRECT_URL=http://127.0.0.1:3000/callback
16 changes: 16 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
root: true,
rules: {
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-explicit-any": "off",
semi: [2, "always"],
quotes: [2, "double", { avoidEscape: true }],
},
plugins: ["jest"],
env: {
"jest/globals": true,
},
};
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
Empty file added .prettierrc.json
Empty file.
13 changes: 13 additions & 0 deletions __tests__/customer.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { describe, test } from "@jest/globals";
import app, { instance } from "../src/app";
import request from "supertest";

describe("CustomerController", function () {
test("should be able to get the customer data.", async function () {
await request(app).get("/customer").expect(200);
});

afterAll(function () {
instance.close();
});
});
13 changes: 13 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { JestConfigWithTsJest } from "ts-jest";

const jestConfig: JestConfigWithTsJest = {
preset: "ts-jest",
testEnvironment: "node",
testTimeout: 1000000,
modulePathIgnorePatterns: ["<rootDir>/dist/"],
moduleNameMapper: {
"^@dexsdk/(.*)$": "<rootDir>/src/$1",
},
};

export default jestConfig;
6 changes: 6 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"watch": ["."],
"ignore": [],
"ext": "ts,json",
"exec": "ts-node ./src/app.ts"
}
Loading