Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Skipped test #758

Merged
merged 2 commits into from
Jul 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/Item/Item.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MappingType } from '@dcl/schemas'
import {
dbCollectionMock,
dbTPCollectionMock,
dbCollectionMock as baseDbCollectionMock,
dbTPCollectionMock as baseDbTPCollectionMock,
} from '../../spec/mocks/collections'
import {
dbItemMock,
Expand Down Expand Up @@ -37,9 +37,14 @@ describe('Item Service', () => {
let dbItem: ItemAttributes
let dbTPItem: ItemAttributes
let service: ItemService
let dbCollectionMock: CollectionAttributes
let dbTPCollectionMock: CollectionAttributes

beforeEach(() => {
service = new ItemService()
jest.resetAllMocks()
dbCollectionMock = { ...baseDbCollectionMock }
dbTPCollectionMock = { ...baseDbTPCollectionMock }
})

describe('isOwnedOrManagedBy', () => {
Expand Down Expand Up @@ -210,7 +215,7 @@ describe('Item Service', () => {
})
})

describe.skip('and the item has less than the maximun amount of tags', () => {
describe('and the item has less than the maximum amount of tags', () => {
beforeEach(() => {
dbItem = {
...dbItemMock,
Expand All @@ -231,6 +236,9 @@ describe('Item Service', () => {
jest
.spyOn(CollectionService.prototype, 'getDBCollection')
.mockResolvedValueOnce(dbCollectionMock)
jest
.spyOn(CollectionService.prototype, 'isDCLPublished')
.mockResolvedValueOnce(false)
;(Item.upsert as jest.Mock).mockResolvedValueOnce(dbItem)
})
it('should not throw any error and return the inserted item', () => {
Expand Down
Loading