Skip to content

Commit 1dddcb4

Browse files
committed
ESM: Ported various tests for completed operations
1 parent 3fd1f4e commit 1dddcb4

23 files changed

Lines changed: 44 additions & 111 deletions

test/index.mjs

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,34 @@ global.ENVIRONMENT_IS_WEB = function() {
2424
};
2525

2626
import TestRegister from "./TestRegister";
27-
// import "./tests/operations/Base58.js";
27+
import "./tests/operations/Base58";
2828
import "./tests/operations/Base64";
29-
// import "./tests/operations/BCD.js";
30-
// import "./tests/operations/BitwiseOp.js";
31-
// import "./tests/operations/BSON.js";
32-
// import "./tests/operations/ByteRepr.js";
29+
import "./tests/operations/BCD";
30+
// import "./tests/operations/BitwiseOp";
31+
// import "./tests/operations/BSON";
32+
import "./tests/operations/ByteRepr";
3333
import "./tests/operations/CartesianProduct";
34-
// import "./tests/operations/CharEnc.js";
34+
import "./tests/operations/CharEnc";
3535
import "./tests/operations/Ciphers";
3636
import "./tests/operations/Checksum";
37-
// import "./tests/operations/Code.js";
38-
// import "./tests/operations/Compress.js";
39-
// import "./tests/operations/DateTime.js";
40-
// import "./tests/operations/FlowControl.js";
37+
// import "./tests/operations/Code";
38+
// import "./tests/operations/Compress";
39+
// import "./tests/operations/Crypt";
40+
// import "./tests/operations/DateTime";
41+
// import "./tests/operations/FlowControl";
4142
import "./tests/operations/Hash";
42-
// import "./tests/operations/Hexdump.js";
43-
// import "./tests/operations/Image.js";
44-
// import "./tests/operations/MorseCode.js";
45-
// import "./tests/operations/MS.js";
46-
// import "./tests/operations/PHP.js";
47-
// import "./tests/operations/NetBIOS.js";
48-
// import "./tests/operations/OTP.js";
43+
import "./tests/operations/Hexdump";
44+
// import "./tests/operations/Image";
45+
import "./tests/operations/MorseCode";
46+
import "./tests/operations/MS";
47+
// import "./tests/operations/PHP";
48+
import "./tests/operations/NetBIOS";
49+
// import "./tests/operations/OTP";
4950
import "./tests/operations/PowerSet";
50-
// import "./tests/operations/Regex.js";
51+
// import "./tests/operations/Regex";
5152
import "./tests/operations/Rotate";
52-
// import "./tests/operations/StrUtils.js";
53-
// import "./tests/operations/SeqUtils.js";
53+
// import "./tests/operations/StrUtils";
54+
import "./tests/operations/SeqUtils";
5455
import "./tests/operations/SetDifference";
5556
import "./tests/operations/SetIntersection";
5657
import "./tests/operations/SetUnion";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @copyright Crown Copyright 2017
66
* @license Apache-2.0
77
*/
8-
import TestRegister from "../../TestRegister.js";
8+
import TestRegister from "../../TestRegister";
99

1010
TestRegister.addTests([
1111
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @copyright Crown Copyright 2018
77
* @license Apache-2.0
88
*/
9-
import TestRegister from "../../TestRegister.js";
9+
import TestRegister from "../../TestRegister";
1010

1111
TestRegister.addTests([
1212
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @copyright Crown Copyright 2017
77
* @license Apache-2.0
88
*/
9-
import TestRegister from "../../TestRegister.js";
9+
import TestRegister from "../../TestRegister";
1010

1111
TestRegister.addTests([
1212
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @copyright Crown Copyright 2017
66
* @license Apache-2.0
77
*/
8-
import TestRegister from "../../TestRegister.js";
8+
import TestRegister from "../../TestRegister";
99

1010
TestRegister.addTests([
1111
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @copyright Crown Copyright 2017
66
* @license Apache-2.0
77
*/
8-
import TestRegister from "../../TestRegister.js";
8+
import TestRegister from "../../TestRegister";
99

1010
const ALL_BYTES = [
1111
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @copyright Crown Copyright 2017
66
* @license Apache-2.0
77
*/
8-
import TestRegister from "../../TestRegister.js";
8+
import TestRegister from "../../TestRegister";
99

1010
TestRegister.addTests([
1111
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @copyright Crown Copyright 2017
88
* @license Apache-2.0
99
*/
10-
import TestRegister from "../../TestRegister.js";
10+
import TestRegister from "../../TestRegister";
1111

1212
const JPATH_TEST_DATA = {
1313
"store": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @copyright Crown Copyright 2017
66
* @license Apache-2.0
77
*/
8-
import TestRegister from "../../TestRegister.js";
8+
import TestRegister from "../../TestRegister";
99

1010
TestRegister.addTests([
1111
{
Lines changed: 3 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,14 @@
11
/**
2-
* Cipher tests.
2+
* Crypt tests.
33
*
4-
* @author Matt C [matt@artemisbot.uk]
54
* @author n1474335 [n1474335@gmail.com]
65
*
7-
* @copyright Crown Copyright 2017
6+
* @copyright Crown Copyright 2018
87
* @license Apache-2.0
98
*/
10-
import TestRegister from "../../TestRegister.js";
9+
import TestRegister from "../../TestRegister";
1110

1211
TestRegister.addTests([
13-
{
14-
name: "Bifid Cipher Encode: no input",
15-
input: "",
16-
expectedOutput: "",
17-
recipeConfig: [
18-
{
19-
"op": "Bifid Cipher Encode",
20-
"args": ["nothing"]
21-
}
22-
],
23-
},
24-
{
25-
name: "Bifid Cipher Encode: no key",
26-
input: "We recreate conditions similar to the Van-Allen radiation belt in our secure facilities.",
27-
expectedOutput: "Vq daqcliho rmltofvlnc qbdhlcr nt qdq Fbm-Rdkkm vuoottnoi aitp al axf tdtmvt owppkaodtx.",
28-
recipeConfig: [
29-
{
30-
"op": "Bifid Cipher Encode",
31-
"args": [""]
32-
}
33-
],
34-
},
35-
{
36-
name: "Bifid Cipher Encode: normal",
37-
input: "We recreate conditions similar to the Van-Allen radiation belt in our secure facilities.",
38-
expectedOutput: "Wc snpsigdd cpfrrcxnfi hikdnnp dm crc Fcb-Pdeug vueageacc vtyl sa zxm crebzp lyoeuaiwpv.",
39-
recipeConfig: [
40-
{
41-
"op": "Bifid Cipher Encode",
42-
"args": ["Schrodinger"]
43-
}
44-
],
45-
},
46-
{
47-
name: "Bifid Cipher Decode: no input",
48-
input: "",
49-
expectedOutput: "",
50-
recipeConfig: [
51-
{
52-
"op": "Bifid Cipher Decode",
53-
"args": ["nothing"]
54-
}
55-
],
56-
},
57-
{
58-
name: "Bifid Cipher Decode: no key",
59-
input: "Vq daqcliho rmltofvlnc qbdhlcr nt qdq Fbm-Rdkkm vuoottnoi aitp al axf tdtmvt owppkaodtx.",
60-
expectedOutput: "We recreate conditions similar to the Van-Allen radiation belt in our secure facilities.",
61-
recipeConfig: [
62-
{
63-
"op": "Bifid Cipher Decode",
64-
"args": [""]
65-
}
66-
],
67-
},
68-
{
69-
name: "Bifid Cipher Decode: normal",
70-
input: "Wc snpsigdd cpfrrcxnfi hikdnnp dm crc Fcb-Pdeug vueageacc vtyl sa zxm crebzp lyoeuaiwpv.",
71-
expectedOutput: "We recreate conditions similar to the Van-Allen radiation belt in our secure facilities.",
72-
recipeConfig: [
73-
{
74-
"op": "Bifid Cipher Decode",
75-
"args": ["Schrodinger"]
76-
}
77-
],
78-
},
79-
8012
/**
8113
* Ciphers
8214
*

0 commit comments

Comments
 (0)