mirror of
https://github.com/thelounge/thelounge
synced 2024-11-10 06:34:21 +00:00
sqlite: don't modify global array during tests
This commit is contained in:
parent
884a92c74b
commit
ec75ff00cb
1 changed files with 2 additions and 2 deletions
|
@ -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"
|
||||
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue