From 4a7fadbeb5615a2017b943c0ef9fa528970be300 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 14 May 2021 00:02:24 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Fix=20frontend=20test=20framewor?= =?UTF-8?q?k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/Modulo unico.iml | 2 +- config-overrides.js | 9 ++++++++- {nest_frontend/public => public}/favicon.ico | Bin {nest_frontend/public => public}/index.html | 0 {nest_frontend/public => public}/logo192.png | Bin {nest_frontend/public => public}/logo512.png | Bin {nest_frontend/public => public}/manifest.json | 0 {nest_frontend/public => public}/robots.txt | 0 8 files changed, 9 insertions(+), 2 deletions(-) rename {nest_frontend/public => public}/favicon.ico (100%) rename {nest_frontend/public => public}/index.html (100%) rename {nest_frontend/public => public}/logo192.png (100%) rename {nest_frontend/public => public}/logo512.png (100%) rename {nest_frontend/public => public}/manifest.json (100%) rename {nest_frontend/public => public}/robots.txt (100%) diff --git a/.idea/Modulo unico.iml b/.idea/Modulo unico.iml index b7c9cfb..ad8246f 100644 --- a/.idea/Modulo unico.iml +++ b/.idea/Modulo unico.iml @@ -17,7 +17,7 @@ - + diff --git a/config-overrides.js b/config-overrides.js index ce26c38..4ce7727 100644 --- a/config-overrides.js +++ b/config-overrides.js @@ -1,10 +1,17 @@ const path = require('path'); module.exports = { - paths: function (paths, env) { + paths: (paths, env) => { paths.appIndexJs = path.resolve(__dirname, 'nest_frontend/index.js'); paths.appSrc = path.resolve(__dirname, 'nest_frontend'); paths.appPublic = path.resolve(__dirname, 'nest_frontend/public'); return paths; }, + + jest: (config) => { + config.roots = config.roots.map(root => root.replace("src", "nest_frontend")) + config.collectCoverageFrom = config.collectCoverageFrom.map(root => root.replace("src", "nest_frontend")) + config.testMatch = config.testMatch.map(root => root.replace("src", "nest_frontend")) + return config; + } } \ No newline at end of file diff --git a/nest_frontend/public/favicon.ico b/public/favicon.ico similarity index 100% rename from nest_frontend/public/favicon.ico rename to public/favicon.ico diff --git a/nest_frontend/public/index.html b/public/index.html similarity index 100% rename from nest_frontend/public/index.html rename to public/index.html diff --git a/nest_frontend/public/logo192.png b/public/logo192.png similarity index 100% rename from nest_frontend/public/logo192.png rename to public/logo192.png diff --git a/nest_frontend/public/logo512.png b/public/logo512.png similarity index 100% rename from nest_frontend/public/logo512.png rename to public/logo512.png diff --git a/nest_frontend/public/manifest.json b/public/manifest.json similarity index 100% rename from nest_frontend/public/manifest.json rename to public/manifest.json diff --git a/nest_frontend/public/robots.txt b/public/robots.txt similarity index 100% rename from nest_frontend/public/robots.txt rename to public/robots.txt