From 2e644c4c7dc6ac87b32e612ea730014a260b3f8b Mon Sep 17 00:00:00 2001 From: carlosjr Date: Mon, 23 Nov 2020 10:04:11 +0100 Subject: [PATCH] back end files --- jest-back.js | 0 jest.back.config.js | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 jest-back.js create mode 100644 jest.back.config.js diff --git a/jest-back.js b/jest-back.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jest.back.config.js b/jest.back.config.js new file mode 100644 index 0000000000..07d106f97d --- /dev/null +++ b/jest.back.config.js @@ -0,0 +1,43 @@ +// For a detailed explanation regarding each configuration property, visit: +// https://jestjs.io/docs/en/configuration.html + +module.exports = { + name: 'Back end', + displayName: { + name: 'Back end', + color: 'blue', + }, + testEnvironment: 'node', + setupFilesAfterEnv: [ + './jest-back.js' + ], + testMatch: [ + 'loopback/**/*.spec.js', + 'modules/*/back/**/*.spec.js' + ], + testPathIgnorePatterns: [ + '/node_modules/' + ], + coveragePathIgnorePatterns: [ + '/node_modules/', + '.spec.js' + ], + moduleFileExtensions: [ + 'js', + ], + moduleNameMapper: { + '\\.(css|scss)$': 'identity-obj-proxy', + '\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '/fileMock.js', + }, + testURL: 'http://localhost', + verbose: false, + errorOnDeprecated: true, + restoreMocks: true, + timers: 'real', + transform: { + '^.+\\.js?$': 'babel-jest', + '^.+\\.html$': 'html-loader-jest' + }, + +}; +