-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathPlatformReporterTests.js
More file actions
37 lines (32 loc) · 1.31 KB
/
PlatformReporterTests.js
File metadata and controls
37 lines (32 loc) · 1.31 KB
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
37
/**
* GPII Linux Platform Reporter unit tests
*
* Copyright 2017 Inclusive Design Research Centre, OCAD University
*
* Licensed under the New BSD license. You may not use this file except in
* compliance with this License.
*
* You may obtain a copy of the License at
* https://github.com/GPII/linux/blob/master/LICENSE.txt
*
* The research leading to these results has received funding from the European Union's
* Seventh Framework Programme (FP7/2007-2013)
* under grant agreement no. 289016.
*/
"use strict";
var fluid = require("gpii-universal"),
os = require("os"),
gpii = fluid.registerNamespace("gpii"),
jqUnit = fluid.require("node-jqunit");
require("../PlatformReporter.js");
fluid.registerNamespace("gpii.platformReporter");
jqUnit.module("GPII Linux Platform Reporter Module");
jqUnit.test("Linux Platform Reporter", function () {
var platformReporter = gpii.platformReporter.linux();
var report = platformReporter.reportPlatform();
jqUnit.assertNotNull("Platform Info", report);
jqUnit.assertEquals("OS", os.platform(), report.id);
jqUnit.assertEquals("version", os.release().replace("_", "-"), report.version);
jqUnit.assertNotNull("Screen resolution", report["screen-resolution"]);
jqUnit.assertNotNull("Available resolutions", report["available-resolution"]);
});