Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ./bin/app.js and adding test #20

Merged
merged 1 commit into from
Nov 26, 2021

Conversation

tpmai22
Copy link
Contributor

@tpmai22 tpmai22 commented Nov 21, 2021

Fix #16

When create test case for ./bin/app.js . I have made options to become a callable function, but when I try to test it the fileFunction object which also access options function create these errors:

●  Cannot log after tests are done. Did you forget to wait for something async in your test?
    Attempted to log "This is main Error
    Error: ENOENT: no such file or directory, lstat 'C:\Users\Administrator\Desktop\repo\octo\undefined'".

      121 |       if (path.includes(".txt")) {
      122 |         return textToHTML(path, lang).then((data) => {
      126 |

      at console.log (node_modules/@jest/console/build/BufferedConsole.js:199:10)
      at bin/fileFunctions.js:123:29

To solve it, I decide to split bin/app.js to become bin/options.js and test/app.test.js . Please kindly review it

@LuigiZaccagnini LuigiZaccagnini merged commit 7519991 into LuigiZaccagnini:main Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement few more test case for the project
2 participants