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

decentraland / marketplace / 8194016372

07 Mar 2024 07:54PM UTC coverage: 66.152% (-0.09%) from 66.242%
8194016372

Pull #2167

github

LautaroPetaccio
fix: Add toasts
Pull Request #2167: feat: Use new cross chain transaction payload action

2507 of 4904 branches covered (51.12%)

Branch coverage included in aggregate %.

8 of 13 new or added lines in 6 files covered. (61.54%)

6 existing lines in 5 files now uncovered.

7601 of 10376 relevant lines covered (73.26%)

70.55 hits per line

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

71.43
/webapp/src/modules/tile/reducer.ts
1
import { AtlasTile } from 'decentraland-ui'
2
import {
3
  LoadingState,
4
  loadingReducer
5
} from 'decentraland-dapps/dist/modules/loading/reducer'
28✔
6
import {
7
  FetchTilesRequestAction,
8
  FetchTilesSuccessAction,
9
  FetchTilesFailureAction,
10
  FETCH_TILES_REQUEST,
11
  FETCH_TILES_SUCCESS,
12
  FETCH_TILES_FAILURE
13
} from './actions'
28✔
14

15
export type TileState = {
16
  data: Record<string, AtlasTile>
17
  lastModified: Date | null
18
  loading: LoadingState
19
  error: string | null
20
}
21

22
const INITIAL_STATE: TileState = {
28✔
23
  data: {},
24
  lastModified: null,
25
  loading: [],
26
  error: null
27
}
28

29
type TileReducerAction =
30
  | FetchTilesRequestAction
31
  | FetchTilesSuccessAction
32
  | FetchTilesFailureAction
33

34
export function tileReducer(state = INITIAL_STATE, action: TileReducerAction) {
237✔
35
  switch (action.type) {
1,962!
36
    case FETCH_TILES_REQUEST: {
37
      return {
237✔
38
        ...state,
39
        lastModified: null,
40
        loading: loadingReducer(state.loading, action)
41
      }
42
    }
43
    case FETCH_TILES_SUCCESS: {
44
      return {
×
45
        ...state,
46
        loading: loadingReducer(state.loading, action),
47
        lastModified: action.payload.lastModified,
48
        error: null,
49
        data: action.payload.tiles
50
      }
51
    }
52
    case FETCH_TILES_FAILURE: {
UNCOV
53
      return {
×
54
        ...state,
55
        loading: loadingReducer(state.loading, action),
56
        error: action.payload.error
57
      }
58
    }
59
    default:
60
      return state
1,725✔
61
  }
62
}
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