mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 23:34:38 +01:00
Fix range node to handle input min > max
and add tests and add pin hover to show confiog
This commit is contained in:
@@ -114,6 +114,14 @@ describe('range Node', function() {
|
||||
genericRangeTest("clamp", 0, 9.5, 0.3, 100.5, true, -13.1, 1, done);
|
||||
});
|
||||
|
||||
it('handles input range where max < min', function(done) {
|
||||
genericRangeTest("scale", 100, 0, 0, -100, false, 40, -60, done);
|
||||
});
|
||||
|
||||
it('handles input range where max < min', function(done) {
|
||||
genericRangeTest("scale", 100, 0, -100, 0, false, 10, -10, done);
|
||||
});
|
||||
|
||||
it('drops msg if in drop mode and input outside range', function(done) {
|
||||
var flow = [{"id":"rangeNode1","type":"range","minin":2,"maxin":8,"minout":20,"maxout":80,"action":"drop","round":true,"name":"rangeNode","wires":[["helperNode1"]]},
|
||||
{id:"helperNode1", type:"helper", wires:[]}];
|
||||
|
||||
Reference in New Issue
Block a user