-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathGetDatasetAvailableDatasetType.test.ts
More file actions
33 lines (30 loc) · 1.12 KB
/
Copy pathGetDatasetAvailableDatasetType.test.ts
File metadata and controls
33 lines (30 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { ApiConfig, DatasetType, getDatasetAvailableDatasetType } from '../../../src'
import { DataverseApiAuthMechanism } from '../../../src/core/infra/repositories/ApiConfig'
import { TestConstants } from '../../testHelpers/TestConstants'
describe('getDatasetAvailableDatasetType', () => {
describe('execute', () => {
beforeAll(async () => {
ApiConfig.init(
TestConstants.TEST_API_URL,
DataverseApiAuthMechanism.API_KEY,
process.env.TEST_API_KEY
)
})
test('should return the default available dataset type', async () => {
const defaultDatasetType = 'dataset'
const actualDatasetType: DatasetType = await getDatasetAvailableDatasetType.execute(
defaultDatasetType
)
const expectedDatasetType = {
id: 1,
name: 'dataset',
displayName: 'Dataset',
linkedMetadataBlocks: [],
availableLicenses: [],
description:
'A study, experiment, set of observations, or publication. A dataset can comprise a single file or multiple files.'
}
expect(actualDatasetType).toEqual(expectedDatasetType)
})
})
})