Skip to content

Commit 6c5aa2b

Browse files
authored
tests/browser.migration: compare version parts as numbers not strings (#8767)
1 parent 2dfadd1 commit 6c5aa2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/integration/browser.migration.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,9 +1170,9 @@ describe('migration', function () {
11701170
function versionGte(scenario, minimumRequired) {
11711171
const match = scenario.match(/^PouchDB v([.\d]+)$/);
11721172
if (!match) { return false; }
1173-
const actual = match[1].split('.');
1173+
const actual = match[1].split('.').map(Number);
11741174

1175-
const min = minimumRequired.split('.');
1175+
const min = minimumRequired.split('.').map(Number);
11761176

11771177
for (let i=0; i<min.length; ++i) {
11781178
if (actual[i] > min[i]) { return true; }

0 commit comments

Comments
 (0)