index.mjs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* eslint no-console: 0 */
  2. /**
  3. * Test Runner
  4. *
  5. * For running the tests in the test register.
  6. *
  7. * @author tlwr [toby@toby.codes]
  8. * @author n1474335 [n1474335@gmail.com]
  9. * @copyright Crown Copyright 2017
  10. * @license Apache-2.0
  11. */
  12. import {
  13. setLongTestFailure,
  14. logTestReport,
  15. } from "../lib/utils";
  16. import TestRegister from "../lib/TestRegister.mjs";
  17. import "./tests/BCD";
  18. import "./tests/BSON";
  19. import "./tests/Base58";
  20. import "./tests/Base64";
  21. import "./tests/Base62";
  22. import "./tests/BitwiseOp";
  23. import "./tests/ByteRepr";
  24. import "./tests/CartesianProduct";
  25. import "./tests/CharEnc";
  26. import "./tests/ChangeIPFormat";
  27. import "./tests/Charts";
  28. import "./tests/Checksum";
  29. import "./tests/Ciphers";
  30. import "./tests/Code";
  31. import "./tests/Comment";
  32. import "./tests/Compress";
  33. import "./tests/ConditionalJump";
  34. import "./tests/Crypt";
  35. import "./tests/CSV";
  36. import "./tests/DateTime";
  37. import "./tests/ExtractEmailAddresses";
  38. import "./tests/Fork";
  39. import "./tests/FromDecimal";
  40. import "./tests/Hash";
  41. import "./tests/HaversineDistance";
  42. import "./tests/Hexdump";
  43. import "./tests/Image";
  44. import "./tests/IndexOfCoincidence";
  45. import "./tests/Jump";
  46. import "./tests/JSONBeautify";
  47. import "./tests/JSONMinify";
  48. import "./tests/JSONtoCSV";
  49. import "./tests/JWTDecode";
  50. import "./tests/JWTSign";
  51. import "./tests/JWTVerify";
  52. import "./tests/MS";
  53. import "./tests/Magic";
  54. import "./tests/MorseCode";
  55. import "./tests/NetBIOS";
  56. import "./tests/OTP";
  57. import "./tests/PGP";
  58. import "./tests/PHP";
  59. import "./tests/ParseIPRange";
  60. import "./tests/ParseQRCode";
  61. import "./tests/PowerSet";
  62. import "./tests/Regex";
  63. import "./tests/Register";
  64. import "./tests/RemoveDiacritics";
  65. import "./tests/Rotate";
  66. import "./tests/SeqUtils";
  67. import "./tests/SetDifference";
  68. import "./tests/SetIntersection";
  69. import "./tests/SetUnion";
  70. import "./tests/StrUtils";
  71. import "./tests/SymmetricDifference";
  72. import "./tests/TextEncodingBruteForce";
  73. import "./tests/TranslateDateTimeFormat";
  74. import "./tests/Magic";
  75. import "./tests/ParseTLV";
  76. import "./tests/Media";
  77. import "./tests/ToFromInsensitiveRegex";
  78. import "./tests/YARA.mjs";
  79. import "./tests/ConvertCoordinateFormat";
  80. import "./tests/Enigma";
  81. import "./tests/Bombe";
  82. import "./tests/MultipleBombe";
  83. import "./tests/Typex";
  84. import "./tests/BLAKE2b";
  85. import "./tests/BLAKE2s";
  86. import "./tests/Protobuf";
  87. import "./tests/ParseSSHHostKey";
  88. import "./tests/DefangIP";
  89. import "./tests/ParseUDP";
  90. // Cannot test operations that use the File type yet
  91. //import "./tests/SplitColourChannels";
  92. // import "./tests/nodeApi/nodeApi";
  93. // import "./tests/nodeApi/ops";
  94. const testStatus = {
  95. allTestsPassing: true,
  96. counts: {
  97. total: 0,
  98. }
  99. };
  100. setLongTestFailure();
  101. const logOpsTestReport = logTestReport.bind(null, testStatus);
  102. TestRegister.runTests()
  103. .then(logOpsTestReport);