Use a random number instead of hard coded in test
This commit is contained in:
@@ -92,7 +92,7 @@ const appearanceValues = {
|
|||||||
const streamOutputVariants = {
|
const streamOutputVariants = {
|
||||||
videoBitrate: randomNumber() * 100,
|
videoBitrate: randomNumber() * 100,
|
||||||
framerate: 42,
|
framerate: 42,
|
||||||
cpuUsageLevel: 2,
|
cpuUsageLevel: randomNumber(4, 0),
|
||||||
scaledHeight: randomNumber() * 100,
|
scaledHeight: randomNumber() * 100,
|
||||||
scaledWidth: randomNumber() * 100,
|
scaledWidth: randomNumber() * 100,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ const crypto = require('crypto');
|
|||||||
const Random = require('crypto-random');
|
const Random = require('crypto-random');
|
||||||
|
|
||||||
//returns a random number in range of [1 - max]
|
//returns a random number in range of [1 - max]
|
||||||
function randomNumber(max = 5) {
|
function randomNumber(max = 5, min = 1) {
|
||||||
return Random.range(1, max);
|
return Random.range(0, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
//returns a random hex string
|
//returns a random hex string
|
||||||
|
|||||||
Reference in New Issue
Block a user