diff --git a/jest.config.js b/jest.config.js index f3dd67c9d447ee3bd768582a2f7e79c1c68b5f9a..0e0eb1635458396e9f4b70098d17718000de1c2f 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,5 @@ module.exports = { - testTimeout: 10000, + testTimeout: 30000, reporters: ['default'], watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'], moduleFileExtensions: ['js', 'json'], diff --git a/pages/API/unicloud-database/unicloud-database.test.js b/pages/API/unicloud-database/unicloud-database.test.js index f0be3dfda88c4393846fbaa62d0e36db60b7fae9..a691f6c12e7b9b6829d6a27a8a7b0d54d683a00c 100644 --- a/pages/API/unicloud-database/unicloud-database.test.js +++ b/pages/API/unicloud-database/unicloud-database.test.js @@ -10,17 +10,17 @@ describe('unicloud-database', () => { await page.callMethod('dbRemove') await page.waitFor(3000) await page.callMethod('dbAdd') - await page.waitFor(2000) + await page.waitFor(1500) await page.callMethod('dbBatchAdd') - await page.waitFor(2000) + await page.waitFor(1500) await page.callMethod('dbGet') - await page.waitFor(2000) + await page.waitFor(1500) await page.callMethod('dbGetWithCommand') - await page.waitFor(2000) + await page.waitFor(1500) await page.callMethod('dbUpdate') - await page.waitFor(2000) + await page.waitFor(1500) await page.callMethod('dbRemove') - await page.waitFor(2000) + await page.waitFor(1500) const { addId, @@ -32,13 +32,11 @@ describe('unicloud-database', () => { removeDeleted, } = await page.data() - console.error((await page.data()).batchAddinserted) - - expect(addId.length > 0).toBe(true) + expect(addId !== '').toBe(true) expect(batchAddIds.length).toBe(2) expect(batchAddinserted).toBe(2) expect(getData.length).toBe(2) - expect(getWithCommandData.length).toBe(2) + expect(getWithCommandData.length).toBe(1) expect(updateUpdated).toBe(3) expect(removeDeleted).toBe(3) @@ -48,7 +46,7 @@ describe('unicloud-database', () => { await page.callMethod('dbLookupInit') await page.waitFor(3000) await page.callMethod('dbLookup') - await page.waitFor(2000) + await page.waitFor(1500) const { lookupData