mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-07 16:22:18 +02:00
sqlite: don't modify global array during tests
This commit is contained in:
parent
884a92c74b
commit
ec75ff00cb
|
@ -111,7 +111,7 @@ describe("SQLite migrations", function () {
|
||||||
it("has working down-migrations", async function () {
|
it("has working down-migrations", async function () {
|
||||||
await serialize_run("BEGIN EXCLUSIVE TRANSACTION");
|
await serialize_run("BEGIN EXCLUSIVE TRANSACTION");
|
||||||
|
|
||||||
for (const rollback of rollbacks.reverse()) {
|
for (const rollback of rollbacks.slice().reverse()) {
|
||||||
if (rollback.rollback_forbidden) {
|
if (rollback.rollback_forbidden) {
|
||||||
throw Error(
|
throw Error(
|
||||||
"Try to write a down migration, if you really can't, flip this to a break"
|
"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 () {
|
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) {
|
if (rollback.rollback_forbidden) {
|
||||||
throw Error(
|
throw Error(
|
||||||
"Try to write a down migration, if you really can't, flip this to a break"
|
"Try to write a down migration, if you really can't, flip this to a break"
|
||||||
|
|
Loading…
Reference in a new issue