You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 25, 2020. It is now read-only.
I was wondering how you would approach running tests against the obfuscated code.
For instance, while all my tests pass prior to obfuscation, after doing so it's possible I broke something. Using __dirname would point to a potentially incorrect path.
To avoid these headaches I was attempting to run all of my unit tests against the obfuscated code, but that doesn't work due to the require paths being completely wrong in the unit tests. I was wondering if you could give me some direction at solving this.
Because the single entry point is exported, it seems impossible to get access to the require'd files from outside of the file.
The text was updated successfully, but these errors were encountered:
i have only run acceptance tests after obfuscating a project. e.g. things that test the "app" directly, not its individual modules.
To avoid these headaches I was attempting to run all of my unit tests against the obfuscated code, but that doesn't work due to the require paths being completely wrong in the unit tests. I was wondering if you could give me some direction at solving this.
depending on how your app/tests are structured, you may be able to put a "phony" entry together which require()s all of your tests:
I was wondering how you would approach running tests against the obfuscated code.
For instance, while all my tests pass prior to obfuscation, after doing so it's possible I broke something. Using
__dirname
would point to a potentially incorrect path.To avoid these headaches I was attempting to run all of my unit tests against the obfuscated code, but that doesn't work due to the require paths being completely wrong in the unit tests. I was wondering if you could give me some direction at solving this.
Because the single entry point is exported, it seems impossible to get access to the require'd files from outside of the file.
The text was updated successfully, but these errors were encountered: