{"size": 754, "ext": "js", "max_stars_repo_path": "test/javadoc.find-files.test.js", "max_stars_repo_name": "allnulled/javadoc", "max_stars_repo_stars_event_min_datetime": "2019-04-11T10:53:36.000Z", "max_stars_repo_stars_event_max_datetime": "2020-10-27T11:38:03.000Z", "max_issues_repo_path": "test/javadoc.find-files.test.js", "max_issues_repo_name": "allnulled/javadoc", "max_issues_repo_issues_event_min_datetime": "2019-04-11T10:58:24.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-07T03:14:30.000Z", "max_forks_repo_path": "test/javadoc.find-files.test.js", "max_forks_repo_name": "allnulled/javadoc", "max_forks_repo_forks_event_min_datetime": "2019-06-03T20:30:05.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-22T15:26:44.000Z"}
{"max_stars_count": 5, "max_issues_count": 3, "max_forks_count": 3, "avg_line_length": 31.4166666667, "max_line_length": 88, "alphanum_fraction": 0.5026525199}
const path = require("path");
const { expect } = require("chai");
const Javadoc = require(__dirname + "/../src/javadoc.js");

describe("Method Javadoc.findFiles(includes, excludes)", function() {

    it("can find multiple included and exclude multiple file patterns", function(done) {
        Javadoc.findFiles([
            "**/*.js",
            "**/*.json",
            "**/*.md"
        ], ["**/*.json", "**/*.js"], {
            cwd: __dirname + "/test-1"
        }).then(files => {
            expect(files.length).to.equal(1);
            expect(path.basename(files[0])).to.equal("file2.md");
            return done();
        }).catch(error => {
            console.log(error);
            expect(true).to.equal(false);
        });
    });

});