fix: Prevent errors during migration for invalid JSON

This commit is contained in:
Joachim Van Herwegen
2023-11-17 15:35:49 +01:00
parent 01623e0b5c
commit 2f928bd2d4
4 changed files with 24 additions and 6 deletions

View File

@@ -63,6 +63,8 @@ describe('A server migrating from v6', (): void => {
// Setup resources should have been migrated
const setupDir = await readdir(joinFilePath(rootFilePath, '.internal/setup/'));
expect(setupDir).toEqual([
// Invalid JSON file was not deleted, only error was logged. Just in case its data needs to be saved.
'aW52YWxpZFJlc291cmNl$.json',
'current-base-url$.json',
'current-server-version$.json',
'setupCompleted-2.0$.json',