test-main.js 572 B

1234567891011121314151617181920
  1. import prunk from 'prunk';
  2. import {jsdom} from 'jsdom';
  3. import chai from 'chai';
  4. // Mock Grafana modules that are not available outside of the core project
  5. // Required for loading module.js
  6. prunk.mock('./css/query-editor.css!', 'no css, dude.');
  7. prunk.mock('app/plugins/sdk', {
  8. QueryCtrl: null
  9. });
  10. // Setup jsdom
  11. // Required for loading angularjs
  12. global.document = jsdom('<html><head><script></script></head><body></body></html>');
  13. global.window = global.document.parentWindow;
  14. // Setup Chai
  15. chai.should();
  16. global.assert = chai.assert;
  17. global.expect = chai.expect;