verify-it 2.3.1 → 2.3.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verify-it",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"description": "Randomised test property/data generation for NodeJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"testing",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"main": "index.js",
|
|
16
16
|
"scripts": {
|
|
17
|
-
"test": "JUNIT_REPORT_PATH=test/test-reports/report.xml nyc --all --include=index.js --include=src/*.js --include=src/*/**.js --reporter=html --reporter=text mocha
|
|
17
|
+
"test": "JUNIT_REPORT_PATH=test/test-reports/report.xml nyc --all --include=index.js --include=src/*.js --include=src/*/**.js --reporter=html --reporter=text mocha test/*.js test/**/*.js",
|
|
18
18
|
"posttest": "standard",
|
|
19
19
|
"check-dependencies": "scripts/spdx-non-copyleft.js"
|
|
20
20
|
},
|
|
@@ -32,19 +32,17 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/bbc/verify-it#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"random-js": "^1.0
|
|
35
|
+
"random-js": "^2.1.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"chai": "^4.
|
|
39
|
-
"chai-as-promised": "^7.1.
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"testdouble": "^3.
|
|
46
|
-
"spdx-copyleft": "^0.1.1",
|
|
47
|
-
"standard": "^12.0.1"
|
|
38
|
+
"chai": "^4.5.0",
|
|
39
|
+
"chai-as-promised": "^7.1.2",
|
|
40
|
+
"license-checker": "^25.0.1",
|
|
41
|
+
"mocha": "^11.0.1",
|
|
42
|
+
"nyc": "^17.1.0",
|
|
43
|
+
"spdx-copyleft": "^1.0.0",
|
|
44
|
+
"standard": "^17.1.2",
|
|
45
|
+
"testdouble": "^3.20.2"
|
|
48
46
|
},
|
|
49
47
|
"standard": {
|
|
50
48
|
"globals": [
|
package/src/Generators.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const RandomJS = require('random-js')
|
|
4
4
|
const enumerateFunctions = require('./function/enumerateFunctions')
|
|
5
5
|
const StringGenerators = require('./generators/StringGenerators')
|
|
6
6
|
const NumericGenerators = require('./generators/NumericGenerators')
|
|
@@ -11,7 +11,7 @@ const SelectionGenerators = require('./generators/SelectionGenerators')
|
|
|
11
11
|
const WordGenerators = require('./generators/WordGenerators')
|
|
12
12
|
const BooleanGenerators = require('./generators/BooleanGenerators')
|
|
13
13
|
|
|
14
|
-
const random = new Random(
|
|
14
|
+
const random = new RandomJS.Random(RandomJS.MersenneTwister19937.autoSeed())
|
|
15
15
|
const stringGenerators = new StringGenerators(random)
|
|
16
16
|
const numericGenerators = new NumericGenerators(random)
|
|
17
17
|
const combinationGenerators = new CombinationGenerators(random, 10)
|
|
@@ -6,7 +6,7 @@ const SelectionGenerators = function (random) {
|
|
|
6
6
|
throw new Error('The options to be picked from must be provided')
|
|
7
7
|
} else if (!Array.isArray(values)) {
|
|
8
8
|
throw new Error('The options to be picked from must be an array')
|
|
9
|
-
} else if (values.length
|
|
9
|
+
} else if (values.length < 1) {
|
|
10
10
|
throw new Error('The options array must have at least one entry')
|
|
11
11
|
}
|
|
12
12
|
|