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

fix - npm test error #1102

Closed
wants to merge 1 commit into from
Closed

Conversation

MindPatch
Copy link

@MindPatch MindPatch commented Apr 14, 2022

#1103

  • using const instead of import
  • adding utils.js file to utils.test.js

Signed-off-by: Khaled Nassar <[email protected]>
@MindPatch MindPatch changed the title loading utils.js fix - npm test error Apr 14, 2022
// </dirty-hack>
class NoClientIdError extends Error {}

const utils = (function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not look right, we should not need to copy the script around to test it, we didn't before (when it worked).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to import it by using const or import commands, but it won't work
keep in mind the last commit on this file (before my changes ) imports the file by using global.eval, and this doesn't import the utils function correctly, and that's what caused the problem

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that it's broken now but copying does not seem to be the correct fix.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but could we use this as a temporary solution until we find a better way to import this file?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it would better to disable the test than merge this workaround (which is no longer testing the actual code but the copied one).

@thc202
Copy link
Member

thc202 commented Sep 20, 2023

Closing, this is not the correct fix, there was no more activity, and there's a new PR (#1296).

@thc202 thc202 closed this Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants