, '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]) }
'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) }
it('should be able to create a component', function () { var parent = new Qt.QtObject(); var component = Qt.createQmlObject(qmlComponentString, parent); assert.isFunction(component.createObject); });
'test main has exec': function () { assert.isFunction(main.exec) }