diff --git a/chapter_03-using-stubs-to-break-dependencies/LogAn/fakeExtensionManager.js b/chapter_03-using-stubs-to-break-dependencies/LogAn/fakeExtensionManager.js new file mode 100644 index 0000000..82c46e0 --- /dev/null +++ b/chapter_03-using-stubs-to-break-dependencies/LogAn/fakeExtensionManager.js @@ -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;