F95API/test/index-test.js

40 lines
1.5 KiB
JavaScript
Raw Permalink 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;
2020-12-26 14:40:17 +00:00
const platform = require("./suites/platform-data-test.js").suite;
2020-11-02 14:06:09 +00:00
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-12-03 11:38:46 +00:00
const prefixParser = require("./suites/prefix-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-12-17 21:44:46 +00:00
this.timeout(30000); // All tests in this suite get 30 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-12-03 11:38:46 +00:00
describe("Test prefix parser", prefixParser.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
2020-12-26 14:40:17 +00:00
describe("Test platform data fetch", platform.bind(this));
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));
});