forked from EddyVerbruggen/Calendar-PhoneGap-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.js
36 lines (31 loc) · 1.02 KB
/
tests.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
exports.defineAutoTests = function() {
var fail = function (done) {
expect(true).toBe(false);
done();
},
succeed = function (done) {
expect(true).toBe(true);
done();
};
describe('Plugin availability', function () {
it("window.plugins.calendar should exist", function() {
expect(window.plugins.calendar).toBeDefined();
});
});
describe('API functions', function () {
it("should define createEventWithOptions", function() {
expect(window.plugins.calendar.createEventWithOptions).toBeDefined();
});
});
/*
TODO extend - this is a copy-paste example of Toast
describe('Invalid usage', function () {
it("should fail due to an invalid position", function(done) {
window.plugins.toast.show('hi', 'short', 'nowhere', fail.bind(null, done), succeed.bind(null, done));
});
it("should fail due to an invalid duration", function(done) {
window.plugins.toast.show('hi', 'medium', 'top', fail.bind(null, done), succeed.bind(null, done));
});
});
*/
};