• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / marketplace / 6468133945

10 Oct 2023 10:36AM UTC coverage: 40.778% (+0.7%) from 40.103%
6468133945

Pull #2030

github

juanmahidalgo
test: add Test for SearchBarDropdown
Pull Request #2030: Feat: new search bar component

2260 of 6951 branches covered (0.0%)

Branch coverage included in aggregate %.

215 of 215 new or added lines in 20 files covered. (100.0%)

4280 of 9087 relevant lines covered (47.1%)

18.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

60.0
/webapp/src/modules/vendor/decentraland/builder/api.ts
1
import { BaseAPI } from 'decentraland-dapps/dist/lib/api'
2
import { AddressesByTagResponse, BuilderCollectionAttributes } from './types'
3
import { config } from '../../../../config'
4
import { retryParams } from '../utils'
5

6
export const BUILDER_SERVER_URL = config.get('BUILDER_SERVER_URL')!
28✔
7

8
class BuilderAPI extends BaseAPI {
9
  fetchAddressesByTag = async (
28✔
10
    tags: string[]
11
  ): Promise<AddressesByTagResponse> => {
12
    return this.request(
×
13
      'get',
14
      `/addresses?${tags.map(tag => `tag=${tag}`).join('&')}`
×
15
    )
16
  }
17

18
  publishedCollectionURL(searchTerm: string, limit: number) {
19
    return `/collections?is_published=true&status=approved&q=${searchTerm}&limit=${limit}`
1✔
20
  }
21

22
  async fetchPublishedCollectionsBySearchTerm({
23
    searchTerm,
24
    limit
25
  }: {
26
    searchTerm: string
27
    limit: number
28
  }): Promise<BuilderCollectionAttributes[]> {
29
    return this.request('get', this.publishedCollectionURL(searchTerm, limit))
×
30
  }
31

32
  contentUrl(hash: string) {
33
    return `${this.url}/storage/contents/${hash}`
4✔
34
  }
35

36
  fetchItemContent = async (
28✔
37
    collectionAddress: string,
38
    itemId: string
39
  ): Promise<Record<string, string>> => {
40
    return this.request('get', `/items/${collectionAddress}/${itemId}/contents`)
×
41
  }
42
}
43

44
export const builderAPI = new BuilderAPI(BUILDER_SERVER_URL, retryParams)
28✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc