forked from github/Toast-PhoneGap-Plugin
Update tests.js
This commit is contained in:
parent
b7bc165d73
commit
489d71aadc
@ -1,19 +1,38 @@
|
|||||||
exports.defineAutoTests = function() {
|
exports.defineAutoTests = function() {
|
||||||
|
describe('Plugin availability (window.plugins.toast)', function () {
|
||||||
define('awesome tests', function() {
|
it("should exist", function() {
|
||||||
it('do something sync', function() {
|
expect(window.plugins.toast).toBeDefined();
|
||||||
expect(1).toBe(1);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('do something async', function(done) {
|
it("should contain a platform specification that is a string", function() {
|
||||||
setTimeout(function() {
|
expect(window.plugins.toastnot).toBeDefined();
|
||||||
expect(1).toBe(1);
|
// expect((new String(window.device.platform)).length > 0).toBe(true);
|
||||||
done();
|
|
||||||
}, 100);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//define('more awesome tests', function() {
|
/*
|
||||||
//});
|
it("should contain a version specification that is a string", function() {
|
||||||
|
expect(window.device.version).toBeDefined();
|
||||||
|
expect((new String(window.device.version)).length > 0).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should contain a UUID specification that is a string or a number", function() {
|
||||||
|
expect(window.device.uuid).toBeDefined();
|
||||||
|
if (typeof window.device.uuid == 'string' || typeof window.device.uuid == 'object') {
|
||||||
|
expect((new String(window.device.uuid)).length > 0).toBe(true);
|
||||||
|
} else {
|
||||||
|
expect(window.device.uuid > 0).toBe(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should contain a cordova specification that is a string", function() {
|
||||||
|
expect(window.device.cordova).toBeDefined();
|
||||||
|
expect((new String(window.device.cordova)).length > 0).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should contain a model specification that is a string", function() {
|
||||||
|
expect(window.device.model).toBeDefined();
|
||||||
|
expect((new String(window.device.model)).length > 0).toBe(true);
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user