Пример #1
0
        public void JS_Node_UnitTests()
        {
            Utilities    MyUtils = new Utilities();
            JS_Utilities JSUtils = new JS_Utilities();

            string testName                  = "jsnodeunittest";
            string finishedString            = "UNIT TESTS COMPLETE";
            string successString             = "SUMMARY: 114 passed (100%), 0 failed (0%)";
            string logOutputFileName_TestApp = testName + "_TestApp.log";

            // Launched all the unit tests for JS Node (npm run unittests)
            int JSTestAppID = JSUtils.StartJSNodeUnitTests(logOutputFileName_TestApp);

            // Wait until summary at the end and if not there, then know not finished
            bool pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, finishedString, 2, false, testName, true, false);

            pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, successString, 1, false, testName, true, false);
        }