@digitaldefiance/express-suite-test-utils 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -70,6 +70,10 @@ MIT
70
70
 
71
71
  ## ChangeLog
72
72
 
73
+ ### v1.0.5
74
+
75
+ - Add secp256k to BSON mock
76
+
73
77
  ### v1.0.4
74
78
 
75
79
  - Add BSON mock
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitaldefiance/express-suite-test-utils",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Test utilities for Digital Defiance Express Suite",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Mock bson module for Jest tests
2
+ * Mock bson and crypto modules for Jest tests
3
3
  */
4
4
  export declare class ObjectId {
5
5
  id: string;
@@ -29,4 +29,19 @@ export declare class Timestamp {
29
29
  }
30
30
  export declare class UUID {
31
31
  }
32
+ export declare const secp256k1: {
33
+ CURVE: {
34
+ p: bigint;
35
+ n: bigint;
36
+ };
37
+ };
38
+ declare const _default: {
39
+ secp256k1: {
40
+ CURVE: {
41
+ p: bigint;
42
+ n: bigint;
43
+ };
44
+ };
45
+ };
46
+ export default _default;
32
47
  //# sourceMappingURL=bson-mock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bson-mock.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-test-utils/src/lib/bson-mock.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,qBAAa,QAAQ;IACA,EAAE,EAAE,MAAM;gBAAV,EAAE,GAAE,MAAmC;IAC1D,QAAQ,IAAI,MAAM;IAGlB,WAAW,IAAI,MAAM;CAGtB;AAED,qBAAa,MAAM;CAAG;AACtB,qBAAa,IAAI;CAAG;AACpB,qBAAa,KAAK;CAAG;AACrB,qBAAa,UAAU;CAAG;AAC1B,qBAAa,MAAM;CAAG;AACtB,qBAAa,KAAK;CAAG;AACrB,qBAAa,IAAI;CAAG;AACpB,qBAAa,MAAM;CAAG;AACtB,qBAAa,MAAM;CAAG;AACtB,qBAAa,SAAS;CAAG;AACzB,qBAAa,IAAI;CAAG"}
1
+ {"version":3,"file":"bson-mock.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-test-utils/src/lib/bson-mock.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,qBAAa,QAAQ;IACA,EAAE,EAAE,MAAM;gBAAV,EAAE,GAAE,MAAmC;IAC1D,QAAQ,IAAI,MAAM;IAGlB,WAAW,IAAI,MAAM;CAGtB;AAED,qBAAa,MAAM;CAAG;AACtB,qBAAa,IAAI;CAAG;AACpB,qBAAa,KAAK;CAAG;AACrB,qBAAa,UAAU;CAAG;AAC1B,qBAAa,MAAM;CAAG;AACtB,qBAAa,KAAK;CAAG;AACrB,qBAAa,IAAI;CAAG;AACpB,qBAAa,MAAM;CAAG;AACtB,qBAAa,MAAM;CAAG;AACtB,qBAAa,SAAS;CAAG;AACzB,qBAAa,IAAI;CAAG;AAGpB,eAAO,MAAM,SAAS;;;;;CAKrB,CAAC;;;;;;;;;AAGF,wBAA6B"}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  /**
3
- * Mock bson module for Jest tests
3
+ * Mock bson and crypto modules for Jest tests
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.UUID = exports.Timestamp = exports.MinKey = exports.MaxKey = exports.Long = exports.Int32 = exports.Double = exports.Decimal128 = exports.DBRef = exports.Code = exports.Binary = exports.ObjectId = void 0;
6
+ exports.secp256k1 = exports.UUID = exports.Timestamp = exports.MinKey = exports.MaxKey = exports.Long = exports.Int32 = exports.Double = exports.Decimal128 = exports.DBRef = exports.Code = exports.Binary = exports.ObjectId = void 0;
7
7
  class ObjectId {
8
8
  id;
9
9
  constructor(id = '000000000000000000000000') {
@@ -50,3 +50,12 @@ exports.Timestamp = Timestamp;
50
50
  class UUID {
51
51
  }
52
52
  exports.UUID = UUID;
53
+ // Mock secp256k1 for ethereum crypto
54
+ exports.secp256k1 = {
55
+ CURVE: {
56
+ p: BigInt(0),
57
+ n: BigInt(0),
58
+ },
59
+ };
60
+ // Default export for ethereum-cryptography
61
+ exports.default = { secp256k1: exports.secp256k1 };