diff --git a/app/app/services/tether.js b/app/app/services/tether.js new file mode 100644 index 00000000..38307d0e --- /dev/null +++ b/app/app/services/tether.js @@ -0,0 +1,22 @@ +import Ember from 'ember'; + +/** + * This is a work around problems that tether introduces into testing. + * TODO: remove this code and refactor in favour of ember-tether + */ +export default Ember.Service.extend({ + createDrop() { + if (Ember.testing) { + return; + } + + return new Drop(...arguments); + }, + createTooltip() { + if (Ember.testing) { + return; + } + + return new Tooltip(...arguments); + } +}); diff --git a/app/tests/unit/services/tether-test.js b/app/tests/unit/services/tether-test.js new file mode 100644 index 00000000..dc2970d5 --- /dev/null +++ b/app/tests/unit/services/tether-test.js @@ -0,0 +1,12 @@ +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('service:tether', 'Unit | Service | tether', { + // Specify the other units that are required for this test. + // needs: ['service:foo'] +}); + +// Replace this with your real tests. +test('it exists', function(assert) { + let service = this.subject(); + assert.ok(service); +});