Skip to content

Commit

Permalink
test(angular): add more test for framework-preset-angular-cli
Browse files Browse the repository at this point in the history
Adds tests in order to rework the code in next commit without changing the angular preset behavior
  • Loading branch information
ThibaudAV committed Mar 26, 2021
1 parent 88f6bb8 commit 5c41213
Show file tree
Hide file tree
Showing 2 changed files with 465 additions and 0 deletions.
6 changes: 6 additions & 0 deletions __mocks__/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,17 @@ const existsSync = (filePath) => !!mockFiles[filePath];
const lstatSync = (filePath) => ({
isFile: () => !!mockFiles[filePath],
});
const statSync = (filePath) => ({
isFile: () => !!mockFiles[filePath],
});
const realpathSync = (filePath = '') => filePath;

// eslint-disable-next-line no-underscore-dangle
fs.__setMockFiles = __setMockFiles;
fs.readFileSync = readFileSync;
fs.existsSync = existsSync;
fs.lstatSync = lstatSync;
fs.statSync = statSync;
fs.realpathSync = realpathSync;

module.exports = fs;

0 comments on commit 5c41213

Please sign in to comment.