[Freeipa-devel] QUnit and unit testing

Endi Sukma Dewata edewata at redhat.com
Mon Sep 13 19:18:16 UTC 2010


----- "Endi Sukma Dewata" <edewata at redhat.com> wrote:

> var addCmd = ipa.createCommand("user-add");

The createCommand() could be implemented like this:

ipa.createCommand = function(method) {
  return new IPACommand(this, method);
}

The QUnit test could be implemented like this:

test("test01", function() {
  var ipa = new IPA("test/test01", IPA_JSON_FOLDER);
  ... do something ...
  ok(true, "PASSED");
});

--
Endi S. Dewata




More information about the Freeipa-devel mailing list