Skip to content

Commit

Permalink
chapter 03: create a new fake that is ready to be configurable to use…
Browse files Browse the repository at this point in the history
… in test
  • Loading branch information
devcorpio committed Jan 11, 2019
1 parent bdce009 commit 2c44a3a
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
function fakeExtensionManager() {
/**
* @type {boolean}
*/
let valid = false;

function willBeValid(value) {
valid = value;
}

/**
* @param {string} fileName
*/
function isValid(fileName) {
return valid;
}

return {
willBeValid,
isValid,
};
}
module.exports = fakeExtensionManager;

0 comments on commit 2c44a3a

Please sign in to comment.