F95API/test/index-test.js

38 lines
1.4 KiB
JavaScript
Raw Normal View History

"use strict";
2020-10-02 15:51:04 +00:00
2020-11-02 14:06:09 +00:00
// Test suite
const api = require("./suites/api-test.js").suite;
const credentials = require("./suites/credentials-test.js").suite;
const network = require("./suites/network-helper-test.js").suite;
const scraper = require("./suites/scraper-test.js").suite;
const searcher = require("./suites/searcher-test.js").suite;
const uScraper = require("./suites/user-scraper-test.js").suite;
2020-11-19 21:28:37 +00:00
const tags = require("./suites/tag-parser-test.js").suite;
2020-11-02 14:06:09 +00:00
describe("Test basic function", function testBasic() {
2020-10-29 21:14:40 +00:00
//#region Set-up
2020-11-02 14:06:09 +00:00
this.timeout(15000); // All tests in this suite get 15 seconds before timeout
2020-10-29 21:14:40 +00:00
//#endregion Set-up
2020-11-02 14:06:09 +00:00
describe("Test credentials class", credentials.bind(this));
describe("Test network helper", network.bind(this));
2020-11-19 21:28:37 +00:00
describe("Test tag parser", tags.bind(this));
2020-09-29 15:11:43 +00:00
});
2020-11-02 14:06:09 +00:00
describe("Test F95 modules", function testF95Modules() {
2020-10-29 21:14:40 +00:00
//#region Set-up
2020-11-02 14:06:09 +00:00
this.timeout(15000); // All tests in this suite get 15 seconds before timeout
2020-10-29 21:14:40 +00:00
//#endregion Set-up
2020-11-02 14:06:09 +00:00
describe("Test scraper methods", scraper.bind(this));
describe("Test searcher methods", searcher.bind(this));
describe("Test user scraper methods", uScraper.bind(this));
2020-09-29 15:11:43 +00:00
});
2020-11-02 14:06:09 +00:00
describe("Test complete API", function testAPI() {
2020-10-29 21:14:40 +00:00
//#region Set-up
2020-11-02 14:06:09 +00:00
this.timeout(15000); // All tests in this suite get 15 seconds before timeout
2020-10-29 21:14:40 +00:00
//#endregion Set-up
2020-11-02 14:06:09 +00:00
describe("Test API", api.bind(this));
});