Example #1
0
  , 'repair() substitutes missing callback argument': function () {
      var ldmock = this.mock(leveldown)
        , args   = [ 'location' ]
        , expect = ldmock
            .expects('repair')
            .once()
            .withArgs(args[0])

      levelup.repair.apply(null, args)
      ldmock.verify()
      assert.equals(2, expect.getCall(0).args.length)
      assert.isFunction(expect.getCall(0).args[1])
    }
Example #2
0
 'levelup()': function () {
   assert.isFunction(levelup)
   assert.equals(levelup.length, 3) // location, options & callback arguments
   assert.exception(levelup, 'InitializationError') // no location
 },
 'test setup() and packup() exist': function () {
   assert.isFunction(repository.setup)
   assert.isFunction(repository.packup)
   assert.equals(1, repository.setup.length)
   assert.equals(2, repository.packup.length)
 }
Example #4
0
 it('should be able to create a component', function () {
     var parent = new Qt.QtObject();
     var component = Qt.createQmlObject(qmlComponentString, parent);
     assert.isFunction(component.createObject);
 });
Example #5
0
 'test main has exec': function () {
   assert.isFunction(main.exec)
 }