I'm confused how to export jQuery correctly in order to test several functions with mocha and the assertion library chai. Hopefully this is a beginner's error...
Here is the code I am testing, with the branch `add_tests`:
I'm having trouble with the functions in
with the tests here:
So, in order to export jQuery, I include the following line:
const $ = require('jquery');
However, I'm still getting errors when I try to use the functions in `miscTest.js`, whereby I'm running `mocha` or `npm test`, I get a TypeError:
TypeError: $.ajax is not a function
This is from trying to run
console.log(Misc.metadata);
within `misc.js`
How do I correctly export jQuery so it's recognized?