I'm trying to use PDF.js via npm for some unit tes...
# javascript
j
I'm trying to use PDF.js via npm for some unit tests. One of the library requirements is that you set a global variable to the path to another script that's part of the npm distribution. The only way I've figured out to make it work is to configure Karma to serve the directory the npm is unpacked to, and then to set the global variable to the directory Karma serves from. Is there some cleaner way to do this without poking at the build internals like this?