diff --git a/package-lock.json b/package-lock.json index 99943a78922a..763499462cfb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10264,9 +10264,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001587", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz", - "integrity": "sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==", + "version": "1.0.30001646", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001646.tgz", + "integrity": "sha512-dRg00gudiBDDTmUhClSdv3hqRfpbOnU28IpI1T6PBTLWa+kOj0681C8uML3PifYfREuBrVjDGhL3adYpBT6spw==", "dev": true, "funding": [ { diff --git a/packages/decap-cms-core/src/__tests__/backend.spec.js b/packages/decap-cms-core/src/__tests__/backend.spec.js index afc465b4df86..c673c19a01c4 100644 --- a/packages/decap-cms-core/src/__tests__/backend.spec.js +++ b/packages/decap-cms-core/src/__tests__/backend.spec.js @@ -327,27 +327,28 @@ describe('Backend', () => { const config = { backend: { - commit_messages:"commit-messages" - } }; + commit_messages: 'commit-messages', + }, + }; const collection = Map({ name: 'posts', }); const entry = Map({ - data: 'old_data' + data: 'old_data', }); const newEntry = Map({ - data: 'new_data' + data: 'new_data', }); const entryDraft = Map({ - entry + entry, }); const user = { login: 'login', name: 'name' }; const backend = new Backend(implementation, { config, backendName: 'github' }); - - backend.currentUser = jest.fn().mockResolvedValue(user); + + backend.currentUser = jest.fn().mockResolvedValue(user); backend.entryToRaw = jest.fn().mockReturnValue('content'); backend.invokePreSaveEvent = jest.fn().mockReturnValueOnce(newEntry); - + await backend.persistEntry({ config, collection, entryDraft }); expect(backend.entryToRaw).toHaveBeenCalledTimes(1); @@ -362,28 +363,29 @@ describe('Backend', () => { const config = { backend: { - commit_messages:"commit-messages" - } }; + commit_messages: 'commit-messages', + }, + }; const collection = Map({ name: 'posts', }); const entry = Map({ - data: Map({}) + data: Map({}), }); const newData = Map({}); const newEntry = Map({ - data: newData + data: newData, }); const entryDraft = Map({ - entry + entry, }); const user = { login: 'login', name: 'name' }; const backend = new Backend(implementation, { config, backendName: 'github' }); - - backend.currentUser = jest.fn().mockResolvedValue(user); + + backend.currentUser = jest.fn().mockResolvedValue(user); backend.entryToRaw = jest.fn().mockReturnValue('content'); backend.invokePreSaveEvent = jest.fn().mockReturnValueOnce(newData); - + await backend.persistEntry({ config, collection, entryDraft }); expect(backend.entryToRaw).toHaveBeenCalledTimes(1);