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

IQSS / dataverse-frontend / 20150732855

11 Dec 2025 11:24PM UTC coverage: 98.063% (+0.3%) from 97.795%
20150732855

Pull #825

github

ekraffmiller
Add text to handle pagination
Pull Request #825: 775 account page notifications

1578 of 1634 branches covered (96.57%)

Branch coverage included in aggregate %.

12 of 12 new or added lines in 6 files covered. (100.0%)

27 existing lines in 12 files now uncovered.

3789 of 3839 relevant lines covered (98.7%)

10902.77 hits per line

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

83.33
/src/sections/file/useFile.tsx
1
import { useEffect, useState } from 'react'
2
import { FileRepository } from '../../files/domain/repositories/FileRepository'
3
import { getFileById } from '../../files/domain/useCases/getFileById'
4
import { File } from '../../files/domain/models/File'
5

6
export function useFile(repository: FileRepository, id: number, datasetVersionNumber?: string) {
33✔
7
  const [file, setFile] = useState<File>()
33✔
8
  const [isLoading, setIsLoading] = useState<boolean>(true)
33✔
9

10
  useEffect(() => {
33✔
11
    setIsLoading(true)
14✔
12

13
    getFileById(repository, id, datasetVersionNumber)
14✔
14
      .then((file: File | undefined) => {
15
        setFile(file)
14✔
16
        setIsLoading(false)
14✔
17
      })
18
      .catch(() => {
UNCOV
19
        console.error('There was an error getting the file')
×
UNCOV
20
        setIsLoading(false)
×
21
      })
22
  }, [repository, id, datasetVersionNumber])
23

24
  return {
33✔
25
    file,
26
    isLoading
27
  }
28
}
5✔
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

© 2026 Coveralls, Inc