File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
test/integration/datasets Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -1280,6 +1280,16 @@ describe('DatasetsRepository', () => {
12801280
12811281 await deletePublishedDatasetViaApi ( testDatasetIds . persistentId )
12821282 } )
1283+
1284+ test ( 'should return error when dataset does not exist' , async ( ) => {
1285+ const expectedError = new ReadError (
1286+ `[404] Dataset with ID ${ nonExistentTestDatasetId } not found.`
1287+ )
1288+
1289+ await expect ( sut . getDatasetVersionsSummaries ( nonExistentTestDatasetId ) ) . rejects . toThrow (
1290+ expectedError
1291+ )
1292+ } )
12831293 } )
12841294
12851295 describe ( 'getDatasetDownloadCount' , ( ) => {
@@ -1316,14 +1326,6 @@ describe('DatasetsRepository', () => {
13161326 await expect ( sut . getDatasetDownloadCount ( nonExistentTestDatasetId ) ) . rejects . toBeInstanceOf (
13171327 ReadError
13181328 )
1319-
1320- const expectedError = new ReadError (
1321- `[404] Dataset with ID ${ nonExistentTestDatasetId } not found.`
1322- )
1323-
1324- await expect ( sut . getDatasetVersionsSummaries ( nonExistentTestDatasetId ) ) . rejects . toThrow (
1325- expectedError
1326- )
13271329 } )
13281330 } )
13291331} )
You can’t perform that action at this time.
0 commit comments