Skip to content

How to write mocha unit testcase for db.follow()  #85

@Nagarjuna-S

Description

@Nagarjuna-S

We are using following code for cloudant changes.

var feed = db.follow({include_docs: true, since: "now"});
feed.filter = function (doc, req) {
    if (doc._deleted || doc.name === "test") {
        return true;
    }
    return false;
};
feed.on('change', function (change) {
    _artifactChange(change);
});

feed.follow();

We want to write mocha unit testcases for above code.. Please share us the samples if any one had already written mocha test cases..

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions