@rpcbase/server 0.358.0 → 0.359.0

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/boot/shared.js CHANGED
@@ -5,7 +5,7 @@ if (typeof __RB_IS_WEBPACK__ === "undefined") {
5
5
 
6
6
  require("./setup_env")
7
7
 
8
- require("../extend-expect")
8
+ require("@rpcbase/std/extend-expect")
9
9
 
10
10
  const mongoose = require("../mongoose")
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.358.0",
3
+ "version": "0.359.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "scripts": {
@@ -69,12 +69,10 @@
69
69
  "cors": "2.8.5",
70
70
  "debug": "4.3.6",
71
71
  "dotenv": "16.4.5",
72
- "expect": "29.7.0",
73
72
  "express": "4.19.2",
74
73
  "express-session": "1.18.0",
75
74
  "firebase-admin": "12.3.0",
76
75
  "glob": "11.0.0",
77
- "jest-extended": "4.0.2",
78
76
  "lodash": "4.17.21",
79
77
  "mkdirp": "3.0.1",
80
78
  "mongoose": "8.5.2",
@@ -1,7 +0,0 @@
1
- /* @flow */
2
- // WARNING: must be first import here
3
- require("./mactchers")
4
-
5
- // add all jest-extended matchers
6
- const matchers = require("jest-extended")
7
- expect.extend(matchers)
@@ -1,42 +0,0 @@
1
- /* @flow */
2
- const {expect} = require("expect")
3
-
4
- const isMongoId = require("validator/lib/isMongoId")
5
- const isEmail = require("validator/lib/isEmail")
6
-
7
-
8
- expect.extend({
9
- toBeMongoId: function(actual) {
10
- const pass = isMongoId(actual)
11
-
12
- if (pass) {
13
- return {
14
- message: () => `expected ${this.utils.printReceived(actual)} not to be a valid mongoId`,
15
- pass: true,
16
- }
17
- } else {
18
- return {
19
- message: () => `expected ${this.utils.printReceived(actual)} to be a valid mongoId`,
20
- pass: false,
21
- }
22
- }
23
- },
24
- toBeEmail: function(actual) {
25
- const pass = actual && isEmail(actual)
26
-
27
- if (pass) {
28
- return {
29
- message: () =>
30
- `expected ${this.utils.printReceived(actual)} not to be a valid email address`,
31
- pass: true,
32
- }
33
- } else {
34
- return {
35
- message: () => `expected ${this.utils.printReceived(actual)} to be a valid email address`,
36
- pass: false,
37
- }
38
- }
39
- },
40
- })
41
-
42
- global.expect = expect