From c7622bb7f3e9d683f863c3945d8f32f49da579de Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Wed, 22 Nov 2023 11:08:06 +0000 Subject: [PATCH] Fix bug in login functionality --- Model/Tests/File.test.ts | 9 +++++++++ Model/jest.config.json | 27 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 Model/Tests/File.test.ts create mode 100644 Model/jest.config.json diff --git a/Model/Tests/File.test.ts b/Model/Tests/File.test.ts new file mode 100644 index 0000000000..ed637d96f4 --- /dev/null +++ b/Model/Tests/File.test.ts @@ -0,0 +1,9 @@ +import BaseModel from 'Common/Models/BaseModel'; +import File from '../Models/File'; + +describe('File', () => { + it('should be an instance of BaseModel', () => { + const file: File = new File(); + expect(file).toBeInstanceOf(BaseModel); + }); +}); diff --git a/Model/jest.config.json b/Model/jest.config.json new file mode 100644 index 0000000000..7c066d401e --- /dev/null +++ b/Model/jest.config.json @@ -0,0 +1,27 @@ +{ + "preset": "ts-jest", + "verbose": true, + "globals": { + "ts-jest": { + "tsconfig": "tsconfig.json", + "babelConfig": false + } + }, + "moduleFileExtensions": ["ts", "js", "json"], + "transform": { + ".(ts|tsx)": "ts-jest" + }, + "testEnvironment": "node", + "collectCoverage": false, + "coverageReporters": ["text", "lcov"], + "testRegex": "./Tests/(.*).test.ts", + "collectCoverageFrom": ["./**/*.(tsx||ts)"], + "coverageThreshold": { + "global": { + "lines": 0, + "functions": 0, + "branches": 0, + "statements": 0 + } + } +}