Skip to content

Commit

Permalink
sqlite: don't modify global array during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brunnre8 committed Nov 6, 2023
1 parent 884a92c commit ec75ff0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/plugins/sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe("SQLite migrations", function () {
it("has working down-migrations", async function () {
await serialize_run("BEGIN EXCLUSIVE TRANSACTION");

for (const rollback of rollbacks.reverse()) {
for (const rollback of rollbacks.slice().reverse()) {
if (rollback.rollback_forbidden) {
throw Error(
"Try to write a down migration, if you really can't, flip this to a break"
Expand Down Expand Up @@ -356,7 +356,7 @@ describe("SQLite Message Storage", function () {
});

it("should be able to downgrade", async function () {
for (const rollback of rollbacks.reverse()) {
for (const rollback of rollbacks.slice().reverse()) {
if (rollback.rollback_forbidden) {
throw Error(
"Try to write a down migration, if you really can't, flip this to a break"
Expand Down

0 comments on commit ec75ff0

Please sign in to comment.