mirror of
https://github.com/documize/community.git
synced 2025-07-27 17:19:42 +02:00
Add tether service
This commit is contained in:
parent
b97d9cd287
commit
400f0d26ce
2 changed files with 34 additions and 0 deletions
22
app/app/services/tether.js
Normal file
22
app/app/services/tether.js
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
});
|
12
app/tests/unit/services/tether-test.js
Normal file
12
app/tests/unit/services/tether-test.js
Normal file
|
@ -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);
|
||||||
|
});
|
Loading…
Add table
Add a link
Reference in a new issue