@@ -72,15 +72,15 @@ describe('execute', () => {
7272
7373 expect ( response ) . toBeUndefined ( )
7474
75- const testDeaccessionDataset : DatasetDeaccessionDTO = {
75+ const testDeaccessionDatasetDTO : DatasetDeaccessionDTO = {
7676 deaccessionReason : 'Description of the deaccession reason.' ,
7777 deaccessionForwardURL : 'https://demo.dataverse.org'
7878 }
7979
8080 const actual = await deaccessionDataset . execute (
8181 createdDatasetIdentifiers . numericId ,
8282 '1.0' ,
83- testDeaccessionDataset
83+ testDeaccessionDatasetDTO
8484 )
8585
8686 expect ( actual ) . toBeUndefined ( )
@@ -91,7 +91,7 @@ describe('execute', () => {
9191 test ( 'should throw an error when the dataset id is incorrect' , async ( ) => {
9292 const createdDatasetIdentifiers = await createDataset . execute ( testDataset )
9393
94- const testDeaccessionDataset : DatasetDeaccessionDTO = {
94+ const testDeaccessionDatasetDTO : DatasetDeaccessionDTO = {
9595 deaccessionReason : 'Description of the deaccession reason.' ,
9696 deaccessionForwardURL : 'https://demo.dataverse.org'
9797 }
@@ -100,7 +100,7 @@ describe('execute', () => {
100100 deaccessionDataset . execute (
101101 createdDatasetIdentifiers . numericId ,
102102 ':latest-published' ,
103- testDeaccessionDataset
103+ testDeaccessionDatasetDTO
104104 )
105105 ) . rejects . toThrow ( Error )
106106
@@ -109,22 +109,22 @@ describe('execute', () => {
109109
110110 test ( 'should not deaccession a dataset when it is not published' , async ( ) => {
111111 const createdDatasetIdentifiers = await createDataset . execute ( testDataset )
112- const testDeaccessionDataset : DatasetDeaccessionDTO = {
112+ const testDeaccessionDatasetDTO : DatasetDeaccessionDTO = {
113113 deaccessionReason : 'Description of the deaccession reason.'
114114 }
115115
116116 await expect (
117117 deaccessionDataset . execute (
118118 createdDatasetIdentifiers . numericId ,
119119 ':latest-published' ,
120- testDeaccessionDataset
120+ testDeaccessionDatasetDTO
121121 )
122122 ) . rejects . toBeInstanceOf ( WriteError )
123123
124124 await deleteUnpublishedDatasetViaApi ( createdDatasetIdentifiers . numericId )
125125 } )
126126
127- test ( 'should deaccession a dataset when it is deaccessioned once' , async ( ) => {
127+ test ( 'should not deaccession a dataset when it is deaccessioned once' , async ( ) => {
128128 const createdDatasetIdentifiers = await createDataset . execute ( testDataset )
129129
130130 const response = await publishDataset . execute (
@@ -135,21 +135,25 @@ describe('execute', () => {
135135
136136 expect ( response ) . toBeUndefined ( )
137137
138- const testDeaccessionDataset : DatasetDeaccessionDTO = {
138+ const testDeaccessionDatasetDTO : DatasetDeaccessionDTO = {
139139 deaccessionReason : 'Description of the deaccession reason.' ,
140140 deaccessionForwardURL : 'https://demo.dataverse.org'
141141 }
142142
143143 const actual = await deaccessionDataset . execute (
144144 createdDatasetIdentifiers . numericId ,
145145 '1.0' ,
146- testDeaccessionDataset
146+ testDeaccessionDatasetDTO
147147 )
148148
149149 expect ( actual ) . toBeUndefined ( )
150150
151151 await expect (
152- deaccessionDataset . execute ( createdDatasetIdentifiers . numericId , '1.0' , testDeaccessionDataset )
152+ deaccessionDataset . execute (
153+ createdDatasetIdentifiers . numericId ,
154+ '1.0' ,
155+ testDeaccessionDatasetDTO
156+ )
153157 ) . rejects . toThrow ( Error )
154158
155159 await deletePublishedDatasetViaApi ( createdDatasetIdentifiers . persistentId )
0 commit comments