`;
beforeEach(function (done) {
+ // Versionize scripts to prevent browser caching
+ const randomHash = (Math.random() * Math.pow(2, 54)).toString(36);
// Create an Iframe so we can resize it to test mediaQueries
const iframe = document.createElement("iframe");
// Inject jQuery and Foundation
injectScriptIn(_document.body, {
- src: 'http://127.0.0.1:3042/node_modules/jquery/dist/jquery.js',
+ src: `http://127.0.0.1:3042/node_modules/jquery/dist/jquery.js?v=${randomHash}`,
});
injectScriptIn(_document.body, {
- src: 'http://127.0.0.1:3042/_build/assets/js/foundation.js',
+ src: `http://127.0.0.1:3042/_build/assets/js/foundation.js?v=${randomHash}`,
onload: () => {
plugin = _window.Foundation.MediaQuery;
plugin._init();
});
afterEach(function() {
- // $iframe.remove();
+ $iframe.remove();
});