2012-03-15 10:17:03 +04:00
|
|
|
describe("System object", function() {
|
|
|
|
var system = require('system');
|
|
|
|
|
|
|
|
it("should exist", function() {
|
|
|
|
expect(typeof system).toEqual('object');
|
|
|
|
expect(system).toNotEqual(null);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("should have platform as string", function() {
|
|
|
|
expect(typeof system.platform).toEqual('string');
|
|
|
|
});
|
|
|
|
|
|
|
|
it("should have platform set to 'phantomjs'", function() {
|
|
|
|
expect(system.platform).toEqual('phantomjs');
|
|
|
|
});
|
2012-03-15 11:40:49 +04:00
|
|
|
|
|
|
|
it("should have args as array", function() {
|
|
|
|
expect(system.args instanceof Array).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("should have args with at least one item", function() {
|
|
|
|
expect(system.args.length >= 1).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("should have args[0] as the this test runner", function() {
|
2012-03-23 14:56:25 +04:00
|
|
|
expect(system.args[0]).toMatch(/run-tests.js$/);
|
2012-03-15 11:40:49 +04:00
|
|
|
});
|
|
|
|
|
2012-03-15 12:19:23 +04:00
|
|
|
it("should have env as object", function() {
|
|
|
|
expect(typeof system.env).toEqual('object');
|
|
|
|
});
|
|
|
|
|
2012-05-18 17:19:27 +04:00
|
|
|
it("should have os as object", function() {
|
|
|
|
expect(typeof system.os).toEqual('object');
|
|
|
|
});
|
|
|
|
|
2012-09-03 17:50:34 +04:00
|
|
|
it("should have isSSLSupported as boolean", function() {
|
|
|
|
expect(typeof system.isSSLSupported).toEqual('boolean');
|
|
|
|
});
|
|
|
|
|
2012-03-15 10:17:03 +04:00
|
|
|
});
|