@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 +1 -1
- package/package.json +1 -3
- package/extend-expect/index.js +0 -7
- package/extend-expect/mactchers.js +0 -42
package/boot/shared.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpcbase/server",
|
|
3
|
-
"version": "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",
|
package/extend-expect/index.js
DELETED
|
@@ -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
|