comparison js/tests/test-bugzilla.js @ 99:544d339d2b4c

Added the beginnings of a black-box app that can be used to generate/run functional tests.
author Atul Varma <avarma@mozilla.com>
date Tue, 27 Apr 2010 09:59:15 -0700
parents 51c1829956d9
children 00b02ba5236c
comparison
equal deleted inserted replaced
98:97fc889dbed4 99:544d339d2b4c
10 ["send",[null]] 10 ["send",[null]]
11 ]; 11 ];
12 12
13 expect(expected.length); 13 expect(expected.length);
14 14
15 var xhr = require("mocks").xhr( 15 var xhr = require("mocks/xhr").create(
16 function xhrDelegate(methodName, args) { 16 function xhrDelegate(methodName, args) {
17 var jsonableArgs = []; 17 var jsonableArgs = [];
18 args.forEach( 18 args.forEach(
19 function(arg) { 19 function(arg) {
20 if (typeof(arg) != "function") 20 if (typeof(arg) != "function")
21 jsonableArgs.push(arg); 21 jsonableArgs.push(arg);
22 }); 22 });
23 ;
24 same([methodName, jsonableArgs], expected.splice(0, 1)[0]); 23 same([methodName, jsonableArgs], expected.splice(0, 1)[0]);
25 }); 24 });
26 25
27 var options = { 26 var options = {
28 xhr: xhr, 27 xhr: xhr,