artillery-plugin-fake-data 1.17.0 → 1.18.0-8bf25eb
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/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3,7 +3,7 @@ const falso = require('@ngneat/falso');
|
|
|
3
3
|
const getFalsoFunctions = () =>
|
|
4
4
|
Object.keys(falso).filter((funcName) => {
|
|
5
5
|
//functions that have the function signature we expect start with rand and aren't == rand (which takes an array)
|
|
6
|
-
if (!funcName.startsWith('rand') && funcName
|
|
6
|
+
if (!funcName.startsWith('rand') && funcName !== 'rand') {
|
|
7
7
|
return false;
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -25,9 +25,9 @@ function ArtilleryPluginFakeData(script, events) {
|
|
|
25
25
|
const pluginConfig =
|
|
26
26
|
script.config['fake-data'] || script.config.plugins['fake-data'];
|
|
27
27
|
|
|
28
|
-
function falsoHandler(context,
|
|
28
|
+
function falsoHandler(context, _ee, next) {
|
|
29
29
|
falsoFunctions.forEach((funcName) => {
|
|
30
|
-
context.funcs[`$${funcName}`] =
|
|
30
|
+
context.funcs[`$${funcName}`] = () => {
|
|
31
31
|
if (pluginConfig[funcName]) {
|
|
32
32
|
return falso[funcName](pluginConfig[funcName]);
|
|
33
33
|
}
|