-/* Copyright (c) 2013-2014 IndexData ApS. http://indexdata.com
+/* Copyright (c) 2013-2014 Index Data ApS. http://indexdata.com
*
* check mkws_config = {} object in browser
*
*/
+describe("Check for external JavaScript libs", function () {
+ it("JSNlog", function () {
+ expect(typeof JL).not.toBe('undefined');
+ });
+
+ it("Handlebars", function () {
+ expect(typeof Handlebars).not.toBe('undefined');
+ });
+
+ it("jQuery", function () {
+ expect(typeof mkws.$).not.toBe('undefined');
+ });
+
+ xit("jQuery UI", function () {
+ // if we have a popup widget, check for the jQuery UI lib
+ if ($(".popup").length > 0) {
+ expect(typeof mkws.$.ui).not.toBe('undefined');
+ }
+ });
+});
+
describe("Check mkws.config object", function () {
it("mkws.config exists", function () {
expect(mkws.config).not.toBe(undefined);
describe("Check pazpar2 config", function () {
it("pazpar2_url is a path or an full URL", function () {
- expect(mkws.config.pazpar2_url).toMatch(/^(\/|https?:\/\/)/)
+ expect(mkws.config.pazpar2_url).toMatch(/^(\/|https?:\/\/|undefined$)/)
});
});