Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

Adds module and test name to the information that is returned in the callback provide...
authorVivin Paliath <vivin.paliath@gmail.com>
Thu, 16 Aug 2012 17:16:17 +0000 (10:16 -0700)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 17 Aug 2012 12:06:20 +0000 (14:06 +0200)
qunit/qunit.js
test/logs.js

index a93f945..b12f1bb 100644 (file)
@@ -422,6 +422,8 @@ QUnit.assert = {
 
                var source,
                        details = {
+                               module: config.current.module,
+                               name: config.current.testName,
                                result: result,
                                message: msg
                        };
@@ -784,6 +786,8 @@ extend( QUnit, {
 
                var output, source,
                        details = {
+                               module: config.current.module,
+                               name: config.current.testName,
                                result: result,
                                message: message,
                                actual: actual,
@@ -829,6 +833,8 @@ extend( QUnit, {
 
                var output,
                        details = {
+                               module: config.current.module,
+                               name: config.current.testName,
                                result: false,
                                message: message
                        };
index 1efd058..f1b6e1f 100644 (file)
@@ -51,7 +51,7 @@ for (var i = 0; i < logs.length; i++) {
 
 module("logs1");
 
-test("test1", 13, function() {
+test("test1", 15, function() {
        equal(begin, 1);
        equal(moduleStart, 1);
        equal(testStart, 1);
@@ -59,6 +59,8 @@ test("test1", 13, function() {
        equal(moduleDone, 0);
 
        deepEqual(logContext, {
+               name: "test1",
+               module: "logs1",
                result: true,
                message: undefined,
                actual: 0,
@@ -66,6 +68,8 @@ test("test1", 13, function() {
        });
        equal("foo", "foo", "msg");
        deepEqual(logContext, {
+               name: "test1",
+               module: "logs1",
                result: true,
                message: "msg",
                actual: "foo",
@@ -80,8 +84,15 @@ test("test1", 13, function() {
        deepEqual(moduleContext, {
                name: "logs1"
        });
+       ok(true, "msg");
+       deepEqual(logContext, {
+               module: "logs1",
+               name: "test1",
+               result: true,
+               message: "msg"
+       });
 
-       equal(log, 12);
+       equal(log, 14);
 });
 test("test2", 10, function() {
        equal(begin, 1);
@@ -94,8 +105,8 @@ test("test2", 10, function() {
                module: "logs1",
                name: "test1",
                failed: 0,
-               passed: 13,
-               total: 13
+               passed: 15,
+               total: 15
        });
        deepEqual(testContext, {
                module: "logs1",
@@ -106,7 +117,7 @@ test("test2", 10, function() {
                name: "logs1"
        });
 
-       equal(log, 22);
+       equal(log, 24);
 });
 
 module("logs2");
@@ -125,14 +136,14 @@ test("test1", 9, function() {
        deepEqual(moduleDoneContext, {
                name: "logs1",
                failed: 0,
-               passed: 23,
-               total: 23
+               passed: 25,
+               total: 25
        });
        deepEqual(moduleContext, {
                name: "logs2"
        });
 
-       equal(log, 31);
+       equal(log, 33);
 });
 test("test2", 8, function() {
        equal(begin, 1);
@@ -149,7 +160,7 @@ test("test2", 8, function() {
                name: "logs2"
        });
 
-       equal(log, 39);
+       equal(log, 41);
 });
 
 var testAutorun = true;

Hosting is provided AltSPAHow to use Git
Please direct any questions on jabber alex.wolf@jabber.ru

Valid HTML 4.0 Transitional Valid CSS!

Designer Alexander Wolf