Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('fitBounds', (t) => {
for (const [{viewport, bounds, options}, expected] of FITBOUNDS_TEST_CASES) {
const result = fitBounds(viewport, bounds, options);
t.ok(Number.isFinite(result.longitude), 'get valid longitude');
t.ok(Number.isFinite(result.latitude), 'get valid latitude');
t.ok(Number.isFinite(result.zoom), 'get valid zoom');
t.deepEqual(
toLowPrecision(result),
toLowPrecision(expected),
'valid viewport returned'
);
}
t.end();
});