diff --git a/test/auth/int.spec.ts b/test/auth/int.spec.ts index a59ef44417..b125ea1609 100644 --- a/test/auth/int.spec.ts +++ b/test/auth/int.spec.ts @@ -49,13 +49,13 @@ describe('Auth', () => { token = data.loginUser.token }) - it('should login', async () => { + it('should login', () => { expect(user.id).toBeDefined() expect(user.email).toEqual(devUser.email) expect(token).toBeDefined() }) - it('should have fields saved to JWT', async () => { + it('should have fields saved to JWT', () => { const decoded = jwtDecode(token) const { collection, email: jwtEmail, exp, iat, roles } = decoded @@ -136,7 +136,7 @@ describe('Auth', () => { expect(data.user.email).toBeDefined() }) - it('should have fields saved to JWT', async () => { + it('should have fields saved to JWT', () => { const decoded = jwtDecode(token) const { collection, @@ -331,7 +331,7 @@ describe('Auth', () => { data = await response.json() }) - it('should create', async () => { + it('should create', () => { expect(data.doc.key).toStrictEqual(key) expect(data.doc.value.property).toStrictEqual(property) }) diff --git a/test/collections-graphql/int.spec.ts b/test/collections-graphql/int.spec.ts index cf2fe2bb8d..2e3c7cf893 100644 --- a/test/collections-graphql/int.spec.ts +++ b/test/collections-graphql/int.spec.ts @@ -4,8 +4,8 @@ import type { Post } from './payload-types.js' import { getPayload } from '../../packages/payload/src/index.js' import { mapAsync } from '../../packages/payload/src/utilities/mapAsync.js' import { NextRESTClient } from '../helpers/NextRESTClient.js' -import { initPayloadInt } from '../helpers/initPayloadInt.js' import { idToString } from '../helpers/idToString.js' +import { initPayloadInt } from '../helpers/initPayloadInt.js' import { startMemoryDB } from '../startMemoryDB.js' import configPromise, { errorOnHookSlug, pointSlug, relationSlug, slug } from './config.js' @@ -619,7 +619,7 @@ describe('collections-graphql', () => { it('should sort find results by nearest distance', async () => { // creating twice as many records as we are querying to get a random sample - await mapAsync([...Array(10)], async () => { + await mapAsync([...Array(10)], () => { // setTimeout used to randomize the creation timestamp setTimeout(async () => { await payload.create({ diff --git a/test/fields/int.spec.ts b/test/fields/int.spec.ts index df780d3a44..065ad75a6c 100644 --- a/test/fields/int.spec.ts +++ b/test/fields/int.spec.ts @@ -95,7 +95,7 @@ describe('Fields', () => { data: { text }, }) - await expect(fieldWithDefaultValue).toEqual(dependentOnFieldWithDefaultValue) + expect(fieldWithDefaultValue).toEqual(dependentOnFieldWithDefaultValue) }) it('should localize an array of strings using hasMany', async () => { @@ -326,7 +326,7 @@ describe('Fields', () => { }) }) - it('creates with default values', async () => { + it('creates with default values', () => { expect(doc.number).toEqual(numberDoc.number) expect(doc.min).toEqual(numberDoc.min) expect(doc.max).toEqual(numberDoc.max) @@ -642,7 +642,7 @@ describe('Fields', () => { expect(docWithIDs.group.subGroup.arrayWithinGroup[0].id).toBeDefined() }) - it('should create with defaultValue', async () => { + it('should create with defaultValue', () => { expect(doc.items).toMatchObject(arrayDefaultValue) expect(doc.localized).toMatchObject(arrayDefaultValue) }) @@ -783,12 +783,12 @@ describe('Fields', () => { }) }) - it('should create with defaultValue', async () => { + it('should create with defaultValue', () => { expect(document.group.defaultParent).toStrictEqual(groupDefaultValue) expect(document.group.defaultChild).toStrictEqual(groupDefaultChild) }) - it('should not have duplicate keys', async () => { + it('should not have duplicate keys', () => { expect(document.arrayOfGroups[0]).toMatchObject({ id: expect.any(String), groupItem: { @@ -808,15 +808,15 @@ describe('Fields', () => { }) }) - it('should create with fields inside a named tab', async () => { + it('should create with fields inside a named tab', () => { expect(document.tab.text).toStrictEqual(namedTabText) }) - it('should create with defaultValue inside a named tab', async () => { + it('should create with defaultValue inside a named tab', () => { expect(document.tab.defaultValue).toStrictEqual(namedTabDefaultValue) }) - it('should create with defaultValue inside a named tab with no other values', async () => { + it('should create with defaultValue inside a named tab with no other values', () => { expect(document.namedTabWithDefaultValue.defaultValue).toStrictEqual(namedTabDefaultValue) }) diff --git a/test/hooks/int.spec.ts b/test/hooks/int.spec.ts index 908414a44f..283220fa97 100644 --- a/test/hooks/int.spec.ts +++ b/test/hooks/int.spec.ts @@ -70,7 +70,7 @@ describe('Hooks', () => { }) }) - it('should execute hooks in correct order on create', async () => { + it('should execute hooks in correct order on create', () => { expect(doc.collectionAfterChange).toBeTruthy() expect(doc.collectionAfterRead).toBeTruthy() expect(doc.collectionBeforeChange).toBeTruthy()