Skip to content

Commit

Permalink
fix(*): 🚑 Fix Realpath construction was skipping root folder
Browse files Browse the repository at this point in the history
  • Loading branch information
iagocalazans committed Jul 20, 2022
1 parent a79d4d0 commit 772a288
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/use.mock.js
Expand Up @@ -34,14 +34,14 @@ if (process.env.NODE_ENV === 'test') {
get: () => ({
getFunctions: jest.fn(() => (functions.reduce((p, c) => {
p[`${c.replace(/\.protected\.js|\.protected\.ts/, '').replace(/\.private\.js|\.private\.ts/, '').replace(/\.js|\.ts/, '')}`] = {
path: path.resolve('./functions', c).replace(/\.js|\.ts/, ''),
path: path.resolve(functionsPath, c).replace(/\.js|\.ts/, ''),
};
return p;
}, {}))),
getSync: jest.fn(),
getAssets: jest.fn(() => (assets.reduce((p, c) => {
p[`/${c.replace(/\.private\.js|\.private\.ts/, '')}`] = {
path: path.resolve('./assets', c).replace(/\.js|\.ts/, ''),
path: path.resolve(assetsPath, c).replace(/\.js|\.ts/, ''),
};
return p;
}, {}))),
Expand Down

0 comments on commit 772a288

Please sign in to comment.