-
Notifications
You must be signed in to change notification settings - Fork 142
Description
Is your request related to a problem?
In MarkBind Version: 2.11.0, I have an issue when importing logger from componentParser.js cause parser.test.js to fail.
For example, calling it accordingly as here
| const logger = require('../../../../util/logger'); |
will cause parser.test.js to fail as shown below.

As @ang-zeyu has pointed out, this occurs for parser.js as well, which is likely the reason logger isn't used in there as well.
The issue is that parser.test.js mocks the whole fs module, which causes the DailyRotateFile constructor to fail automatically in finding the directory.
Describe the solution you'd like
A simple fix would be to only mock the specific functions of fs relavant to parser.test.js
(Describe your proposed solution here.)
Describe alternatives you've considered
(Write your answer here.)
Additional context
(Write your answer here.)