Skip to content

Commit b2e5d3d

Browse files
committed
fix test case for mysql > 8
Signed-off-by: Tobias Gurtzick <[email protected]>
1 parent a3eeda2 commit b2e5d3d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/mysql_test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,12 @@ lab.experiment('mysql', () => {
289289
expect(primaryColumn.meta.column_key).to.equal('PRI');
290290

291291
// Testing the "after" constraint
292-
expect(columns[1].getName()).to.equal('date');
292+
// mysql > 8 does not return the same way anymore,
293+
// results may be in random order, so we check explicitly
294+
// the element with ordinal position 2
295+
expect(
296+
columns.find((x) => x.meta.ordinal_position === 2).getName()
297+
).to.equal('date');
293298
});
294299
});
295300

0 commit comments

Comments
 (0)