<!DOCTYPE html><html><head>
<title>Math.min and Number.MAX_VALUE</title>
<style>p{white-space: pre;}</style>
</head>
<body>
    <p>FAILED (script did not run)</p>
    <script>
        var failures = [];
        Math.min(1,2) === 1 || failures.push('Math.min(1,2) failed to return 1');
        Math.min(Number.MAX_VALUE,2) === 2 || failures.push('Math.min(Number.MAX_VALUE,2) failed to return 2');
        Math.min(Number.MAX_VALUE, Number.MIN_VALUE) === Number.MIN_VALUE || failures.push('Comparing MAX_VALUE and MIN_VALUE with Math.min() failed');
        document.getElementsByTagName('p')[0].firstChild.data = failures.length === 0 ? 'PASSED' : 'FAILED - ' + failures.join('\n');

    </script>

</body>
</html>
Test case for Math.min() bug breaking Highcharts
Test case for Math.min() bug breaking Highcharts
