diff --git a/resources/static/test/mocks/cachify.js b/resources/static/test/mocks/cachify.js new file mode 100644 index 0000000000000000000000000000000000000000..7f95a7aa46a82b816d4c07b6967136c6fb22d342 --- /dev/null +++ b/resources/static/test/mocks/cachify.js @@ -0,0 +1,15 @@ +/*jshint browsers:true, forin: true, laxbreak: true */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +window.cachify = (function() { + "use strict"; + + // cachify is a node module used for caching resources, as such it is not + // available to the client. The main site makes use of cachify in its + // templates to serve up cached resources. The front end unit tests write + // the main site templates to the DOM to run. Create a mock cachify so the + // front end unit tests can run. + return function(url) { return url; } +}()); + diff --git a/resources/views/test.ejs b/resources/views/test.ejs index 8f6ea43fe4403fe499028fe55ee072f1b92ab9a5..7f05abc2301be6417ad5444f2932d358047a7d19 100644 --- a/resources/views/test.ejs +++ b/resources/views/test.ejs @@ -86,6 +86,7 @@ <script src="mocks/provisioning.js"></script> <script src="mocks/window.js"></script> <script src="mocks/winchan.js"></script> + <script src="mocks/cachify.js"></script> <script src="/shared/renderer.js"></script> <script src="/shared/class.js"></script>