Skip to content

Commit 5c73311

Browse files
committed
fix: test remove . for all error cases
1 parent b0e3bc9 commit 5c73311

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

test/functional/files/UpdateFileTabularTags.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('execute', () => {
2222
const testCollectionAlias = 'updateFileMetadataFunctionalTest'
2323
let testDatasetIds: CreatedDatasetIdentifiers
2424
const testTextFile4Name = 'test-file-4.tab'
25-
const tabularTags = ['Event', 'Survey']
25+
const tabularTags = ['Event']
2626

2727
beforeAll(async () => {
2828
ApiConfig.init(
@@ -75,7 +75,7 @@ describe('execute', () => {
7575
DatasetNotNumberedVersion.LATEST
7676
)) as FileModel
7777

78-
expect(fileInfo.tabularTags).toEqual(['Event', 'Survey'])
78+
expect(fileInfo.tabularTags).toEqual(tabularTags)
7979
}
8080
})
8181

test/integration/files/FilesRepository.test.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ describe('FilesRepository', () => {
170170
test('should return error when dataset does not exist', async () => {
171171
const nonExistentTestDatasetId = 100
172172
const errorExpected: ReadError = new ReadError(
173-
`[404] Dataset with ID ${nonExistentTestDatasetId} not found.`
173+
`[404] Dataset with ID ${nonExistentTestDatasetId} not found`
174174
)
175175

176176
await expect(
@@ -496,7 +496,7 @@ describe('FilesRepository', () => {
496496
})
497497

498498
test('should return error when file does not exist', async () => {
499-
const expectedError = new ReadError(`[404] File with ID ${nonExistentFiledId} not found.`)
499+
const expectedError = new ReadError(`[404] File with ID ${nonExistentFiledId} not found`)
500500

501501
await expect(
502502
sut.getFile(nonExistentFiledId, DatasetNotNumberedVersion.LATEST, false)
@@ -527,7 +527,7 @@ describe('FilesRepository', () => {
527527
test('should return error when file does not exist', async () => {
528528
const nonExistentFiledPersistentId = 'nonExistentFiledPersistentId'
529529
const expectedError = new ReadError(
530-
`[404] Datafile with Persistent ID ${nonExistentFiledPersistentId} not found.`
530+
`[404] Datafile with Persistent ID ${nonExistentFiledPersistentId} not found`
531531
)
532532

533533
await expect(
@@ -571,7 +571,7 @@ describe('FilesRepository', () => {
571571
})
572572

573573
test('should return error when file does not exist', async () => {
574-
const errorExpected = new ReadError(`[404] File with ID ${nonExistentFiledId} not found.`)
574+
const errorExpected = new ReadError(`[404] File with ID ${nonExistentFiledId} not found`)
575575

576576
await expect(
577577
sut.getFileCitation(nonExistentFiledId, DatasetNotNumberedVersion.LATEST, false)
@@ -630,9 +630,7 @@ describe('FilesRepository', () => {
630630

631631
test('should return error when dataset does not exist', async () => {
632632
const nonExistentDatasetId = 400000
633-
const errorExpected = new ReadError(
634-
`[404] Dataset with ID ${nonExistentDatasetId} not found.`
635-
)
633+
const errorExpected = new ReadError(`[404] Dataset with ID ${nonExistentDatasetId} not found`)
636634

637635
await expect(
638636
sut.getFileUploadDestination(nonExistentDatasetId, singlepartFile)
@@ -721,7 +719,7 @@ describe('FilesRepository', () => {
721719
test('should return error when file does not exist', async () => {
722720
const tag = ['Data']
723721

724-
const errorExpected = new WriteError(`[404] File with ID ${nonExistentFiledId} not found.`)
722+
const errorExpected = new WriteError(`[404] File with ID ${nonExistentFiledId} not found`)
725723

726724
await expect(sut.updateFileCategories(nonExistentFiledId, tag, false)).rejects.toThrow(
727725
errorExpected
@@ -830,7 +828,7 @@ describe('FilesRepository', () => {
830828
})
831829

832830
test('should return error when file does not exist', async () => {
833-
const expectedError = new WriteError(`[404] File with ID ${nonExistentFiledId} not found.`)
831+
const expectedError = new WriteError(`[404] File with ID ${nonExistentFiledId} not found`)
834832

835833
await expect(sut.deleteFile(nonExistentFiledId)).rejects.toThrow(expectedError)
836834
})

0 commit comments

Comments
 (0)