UNPKG

gpii-windows

Version:

Components of the GPII personalization infrastructure for use on Microsoft's "Windows" ™

44 lines (34 loc) 1.4 kB
/** * GPII Process Reporter Tests * * Copyright 2015-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/universal/LICENSE.txt */ "use strict"; var fluid = require("gpii-universal"), jqUnit = fluid.require("node-jqunit"); require("processReporter"); var gpii = fluid.registerNamespace("gpii"); var processReporter = fluid.registerNamespace("gpii.processReporter"); jqUnit.module("GPII Windows ProcessReporter Module"); jqUnit.test("Running tests for Windows Process Reporter", function () { jqUnit.expect(3); // Check that the bridge is loaded and required methods are available // var methods = ["find"]; for (var method in methods) { jqUnit.assertTrue("Checking availability of method '" + method + "'", (methods[method] in processReporter)); } // This is running inside 'node' itself, so the uid matches. jqUnit.assertTrue("Checking run-status of process 'node'", gpii.processReporter.find("node.exe")); // Unlikely there is ever a process named "T6y7u8i9C". jqUnit.assertFalse("Checking run-status of process 'T6y7u8i9'", gpii.processReporter.find("T6y7u8i9C")); });