2018-05-14 17:33:16 +00:00
|
|
|
/* eslint no-console: 0 */
|
|
|
|
|
|
|
|
/**
|
2018-05-17 15:11:34 +00:00
|
|
|
* Test Runner
|
2018-05-14 17:33:16 +00:00
|
|
|
*
|
|
|
|
* For running the tests in the test register.
|
|
|
|
*
|
|
|
|
* @author tlwr [toby@toby.codes]
|
|
|
|
* @author n1474335 [n1474335@gmail.com]
|
|
|
|
* @copyright Crown Copyright 2017
|
|
|
|
* @license Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2019-01-04 10:29:27 +00:00
|
|
|
import {
|
|
|
|
setLongTestFailure,
|
|
|
|
logTestReport,
|
|
|
|
} from "../lib/utils";
|
2018-05-14 17:33:16 +00:00
|
|
|
|
2019-07-09 11:23:59 +00:00
|
|
|
import TestRegister from "../lib/TestRegister.mjs";
|
2018-12-28 21:49:40 +00:00
|
|
|
import "./tests/BCD";
|
|
|
|
import "./tests/BSON";
|
2019-03-02 14:00:42 +00:00
|
|
|
import "./tests/BaconCipher";
|
2018-12-28 21:49:40 +00:00
|
|
|
import "./tests/Base58";
|
|
|
|
import "./tests/Base64";
|
|
|
|
import "./tests/Base62";
|
|
|
|
import "./tests/BitwiseOp";
|
|
|
|
import "./tests/ByteRepr";
|
|
|
|
import "./tests/CartesianProduct";
|
|
|
|
import "./tests/CharEnc";
|
2019-08-24 00:14:44 +00:00
|
|
|
import "./tests/ChangeIPFormat";
|
2019-03-14 13:37:11 +00:00
|
|
|
import "./tests/Charts";
|
2018-12-28 21:49:40 +00:00
|
|
|
import "./tests/Checksum";
|
|
|
|
import "./tests/Ciphers";
|
|
|
|
import "./tests/Code";
|
|
|
|
import "./tests/Comment";
|
|
|
|
import "./tests/Compress";
|
|
|
|
import "./tests/ConditionalJump";
|
|
|
|
import "./tests/Crypt";
|
|
|
|
import "./tests/CSV";
|
|
|
|
import "./tests/DateTime";
|
|
|
|
import "./tests/ExtractEmailAddresses";
|
|
|
|
import "./tests/Fork";
|
|
|
|
import "./tests/FromDecimal";
|
|
|
|
import "./tests/Hash";
|
|
|
|
import "./tests/HaversineDistance";
|
|
|
|
import "./tests/Hexdump";
|
|
|
|
import "./tests/Image";
|
2019-06-08 20:49:31 +00:00
|
|
|
import "./tests/IndexOfCoincidence";
|
2018-12-28 21:49:40 +00:00
|
|
|
import "./tests/Jump";
|
|
|
|
import "./tests/JSONBeautify";
|
|
|
|
import "./tests/JSONMinify";
|
2019-04-28 20:29:15 +00:00
|
|
|
import "./tests/JSONtoCSV";
|
2018-12-28 21:49:40 +00:00
|
|
|
import "./tests/JWTDecode";
|
|
|
|
import "./tests/JWTSign";
|
|
|
|
import "./tests/JWTVerify";
|
|
|
|
import "./tests/MS";
|
|
|
|
import "./tests/Magic";
|
|
|
|
import "./tests/MorseCode";
|
|
|
|
import "./tests/NetBIOS";
|
|
|
|
import "./tests/OTP";
|
|
|
|
import "./tests/PGP";
|
|
|
|
import "./tests/PHP";
|
|
|
|
import "./tests/ParseIPRange";
|
|
|
|
import "./tests/ParseQRCode";
|
|
|
|
import "./tests/PowerSet";
|
|
|
|
import "./tests/Regex";
|
|
|
|
import "./tests/Register";
|
|
|
|
import "./tests/RemoveDiacritics";
|
|
|
|
import "./tests/Rotate";
|
|
|
|
import "./tests/SeqUtils";
|
|
|
|
import "./tests/SetDifference";
|
|
|
|
import "./tests/SetIntersection";
|
|
|
|
import "./tests/SetUnion";
|
|
|
|
import "./tests/StrUtils";
|
|
|
|
import "./tests/SymmetricDifference";
|
|
|
|
import "./tests/TextEncodingBruteForce";
|
|
|
|
import "./tests/TranslateDateTimeFormat";
|
|
|
|
import "./tests/Magic";
|
|
|
|
import "./tests/ParseTLV";
|
|
|
|
import "./tests/Media";
|
2019-01-10 14:53:21 +00:00
|
|
|
import "./tests/ToFromInsensitiveRegex";
|
2019-01-15 16:24:29 +00:00
|
|
|
import "./tests/YARA.mjs";
|
2019-01-18 16:05:44 +00:00
|
|
|
import "./tests/ConvertCoordinateFormat";
|
2019-01-03 16:36:56 +00:00
|
|
|
import "./tests/Enigma";
|
2019-01-04 13:33:31 +00:00
|
|
|
import "./tests/Bombe";
|
2019-01-10 18:04:02 +00:00
|
|
|
import "./tests/MultipleBombe";
|
2019-02-28 17:22:09 +00:00
|
|
|
import "./tests/Typex";
|
2019-03-26 19:09:57 +00:00
|
|
|
import "./tests/BLAKE2b";
|
|
|
|
import "./tests/BLAKE2s";
|
2019-04-12 15:13:10 +00:00
|
|
|
import "./tests/Protobuf";
|
2019-07-15 13:12:40 +00:00
|
|
|
import "./tests/ParseSSHHostKey";
|
2019-05-11 19:24:39 +00:00
|
|
|
import "./tests/DefangIP";
|
2019-08-19 19:14:22 +00:00
|
|
|
import "./tests/ParseUDP";
|
2018-05-14 17:33:16 +00:00
|
|
|
|
2018-12-26 16:33:10 +00:00
|
|
|
// Cannot test operations that use the File type yet
|
2018-12-28 21:49:40 +00:00
|
|
|
//import "./tests/SplitColourChannels";
|
2018-12-26 16:33:10 +00:00
|
|
|
|
2019-01-04 10:29:27 +00:00
|
|
|
// import "./tests/nodeApi/nodeApi";
|
|
|
|
// import "./tests/nodeApi/ops";
|
2018-05-14 17:33:16 +00:00
|
|
|
|
2019-01-04 10:29:27 +00:00
|
|
|
const testStatus = {
|
|
|
|
allTestsPassing: true,
|
|
|
|
counts: {
|
|
|
|
total: 0,
|
2018-05-14 17:33:16 +00:00
|
|
|
}
|
2017-05-02 23:40:39 +00:00
|
|
|
};
|
2018-05-14 17:33:16 +00:00
|
|
|
|
2019-01-04 10:29:27 +00:00
|
|
|
setLongTestFailure();
|
2018-05-14 17:33:16 +00:00
|
|
|
|
2019-01-04 10:29:27 +00:00
|
|
|
const logOpsTestReport = logTestReport.bind(null, testStatus);
|
2018-05-14 17:33:16 +00:00
|
|
|
|
|
|
|
TestRegister.runTests()
|
2019-01-04 10:29:27 +00:00
|
|
|
.then(logOpsTestReport);
|