node-tdd 3.5.4 → 4.0.1
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/lib/modules/cache-clearer.js +12 -17
- package/lib/util/desc.js +1 -1
- package/package.json +19 -19
|
@@ -11,12 +11,11 @@ const getFns = (obj) => {
|
|
|
11
11
|
}
|
|
12
12
|
for (let i = 0; i < properties.length; i += 1) {
|
|
13
13
|
const key = properties[i];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
result.push({ obj, key, value });
|
|
14
|
+
try {
|
|
15
|
+
const value = LRU.prototype[key];
|
|
16
|
+
assert(typeof value === 'function');
|
|
17
|
+
result.push({ obj, key, value });
|
|
18
|
+
} catch (e) { /* ignored */ }
|
|
20
19
|
}
|
|
21
20
|
return result;
|
|
22
21
|
};
|
|
@@ -32,23 +31,19 @@ export default () => {
|
|
|
32
31
|
inject: () => {
|
|
33
32
|
assert(injected === false);
|
|
34
33
|
fns.forEach(({ obj, key, value }) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
} catch (e) { /* ignored */ }
|
|
34
|
+
// eslint-disable-next-line no-param-reassign,func-names
|
|
35
|
+
obj[key] = function (...args) {
|
|
36
|
+
caches.push(this);
|
|
37
|
+
return value.call(this, ...args);
|
|
38
|
+
};
|
|
42
39
|
});
|
|
43
40
|
injected = true;
|
|
44
41
|
},
|
|
45
42
|
release: () => {
|
|
46
43
|
assert(injected === true);
|
|
47
44
|
fns.forEach(({ obj, key, value }) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
obj[key] = value;
|
|
51
|
-
} catch (e) { /* ignored */ }
|
|
45
|
+
// eslint-disable-next-line no-param-reassign
|
|
46
|
+
obj[key] = value;
|
|
52
47
|
});
|
|
53
48
|
caches.splice(0).forEach((c) => c.clear());
|
|
54
49
|
injected = false;
|
package/lib/util/desc.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import assert from 'assert';
|
|
2
2
|
import path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
3
4
|
import fs from 'smart-fs';
|
|
4
5
|
import callsites from 'callsites';
|
|
5
6
|
import get from 'lodash.get';
|
|
6
|
-
import { fileURLToPath } from 'url';
|
|
7
7
|
import minimist from 'minimist';
|
|
8
8
|
import tmp from 'tmp';
|
|
9
9
|
import Joi from 'joi-strict';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-tdd",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.1",
|
|
5
5
|
"description": "Drop in extension for mocha to abstract commonly used test setups",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -41,25 +41,25 @@
|
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://github.com/blackflux/node-tdd#readme",
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@aws-sdk/client-sqs": "3.
|
|
44
|
+
"@aws-sdk/client-sqs": "3.385.0",
|
|
45
45
|
"@babel/core": "7.22.9",
|
|
46
46
|
"@babel/eslint-parser": "7.22.9",
|
|
47
47
|
"@babel/register": "7.22.5",
|
|
48
|
-
"@blackflux/eslint-plugin-rules": "
|
|
49
|
-
"@blackflux/robo-config-plugin": "9.
|
|
50
|
-
"aws-sdk-wrap": "13.0.
|
|
48
|
+
"@blackflux/eslint-plugin-rules": "3.0.0",
|
|
49
|
+
"@blackflux/robo-config-plugin": "9.1.9",
|
|
50
|
+
"aws-sdk-wrap": "13.0.6",
|
|
51
51
|
"axios": "1.4.0",
|
|
52
|
-
"c8": "8.0.
|
|
53
|
-
"chai": "4.3.
|
|
54
|
-
"eslint": "8.
|
|
52
|
+
"c8": "8.0.1",
|
|
53
|
+
"chai": "4.3.7",
|
|
54
|
+
"eslint": "8.46.0",
|
|
55
55
|
"eslint-config-airbnb-base": "15.0.0",
|
|
56
|
-
"eslint-plugin-import": "2.
|
|
56
|
+
"eslint-plugin-import": "2.28.0",
|
|
57
57
|
"eslint-plugin-json": "3.1.0",
|
|
58
|
-
"eslint-plugin-markdown": "3.0.
|
|
58
|
+
"eslint-plugin-markdown": "3.0.1",
|
|
59
59
|
"eslint-plugin-mocha": "10.1.0",
|
|
60
60
|
"fancy-log": "2.0.0",
|
|
61
|
-
"js-gardener": "5.0.
|
|
62
|
-
"lambda-monitor-logger": "
|
|
61
|
+
"js-gardener": "5.0.1",
|
|
62
|
+
"lambda-monitor-logger": "5.0.0"
|
|
63
63
|
},
|
|
64
64
|
"licenses": [
|
|
65
65
|
{
|
|
@@ -68,24 +68,24 @@
|
|
|
68
68
|
}
|
|
69
69
|
],
|
|
70
70
|
"engines": {
|
|
71
|
-
"node": ">=
|
|
71
|
+
"node": ">= 16"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
74
74
|
"lib"
|
|
75
75
|
],
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"callsites": "4.0.0",
|
|
78
|
-
"joi-strict": "
|
|
78
|
+
"joi-strict": "3.0.0",
|
|
79
79
|
"lodash.clonedeep": "4.5.0",
|
|
80
80
|
"lodash.get": "4.4.2",
|
|
81
|
-
"lru-cache-ext": "
|
|
81
|
+
"lru-cache-ext": "4.0.0",
|
|
82
82
|
"minimist": "1.2.8",
|
|
83
83
|
"nock": "13.3.2",
|
|
84
84
|
"normalize-url": "2.0.1",
|
|
85
|
-
"object-scan": "
|
|
86
|
-
"smart-fs": "
|
|
87
|
-
"timekeeper": "2.
|
|
85
|
+
"object-scan": "19.0.1",
|
|
86
|
+
"smart-fs": "4.0.0",
|
|
87
|
+
"timekeeper": "2.3.1",
|
|
88
88
|
"tmp": "0.2.1",
|
|
89
|
-
"xml2js": "0.6.
|
|
89
|
+
"xml2js": "0.6.2"
|
|
90
90
|
}
|
|
91
91
|
}
|