From a6c2f91ab9b637c190ef5f50b845bfa7e0d1ba37 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Thu, 23 Apr 2020 18:11:29 +0200 Subject: [PATCH] Add tests --- jest.config.js | 14 ++++++++++++++ package.json | 1 + test/ExampleApp.test.ts | 5 +++++ 3 files changed, 20 insertions(+) create mode 100644 jest.config.js create mode 100644 test/ExampleApp.test.ts diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..b61dffa --- /dev/null +++ b/jest.config.js @@ -0,0 +1,14 @@ +module.exports = { + transform: { + "^.+\\.ts$": "ts-jest" + }, + moduleFileExtensions: [ + 'js', + 'ts', + 'd.ts' + ], + testMatch: [ + '**/test/**/*.test.ts' + ], + testEnvironment: 'node' +}; \ No newline at end of file diff --git a/package.json b/package.json index d088e21..7fefbb7 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@babel/preset-env": "^7.9.5", "@types/config": "^0.0.36", "@types/express": "^4.17.6", + "@types/jest": "^25.2.1", "@types/node": "^13.13.2", "babel-loader": "^8.1.0", "concurrently": "^5.1.0", diff --git a/test/ExampleApp.test.ts b/test/ExampleApp.test.ts new file mode 100644 index 0000000..451f0fb --- /dev/null +++ b/test/ExampleApp.test.ts @@ -0,0 +1,5 @@ +describe('Write your tests', () => { + test('Remove this when you have some tests', () => { + expect(false).toBe(true); + }); +}); \ No newline at end of file