@@ -56,14 +56,13 @@ describe('The MCWS Persistence Provider', () => {
5656 ) ;
5757 } ) ;
5858
59- it ( 'provides a promise for available namespaces' , async ( done ) => {
59+ it ( 'provides a promise for available namespaces' , async ( ) => {
6060 const spaces = await mcwsPersistenceProvider . getPersistenceNamespaces ( ) ;
6161 expect ( spaces ) . toEqual ( persistenceNamespaces ) ;
62- done ( ) ;
6362 } ) ;
6463
6564 // DO WE DELETE THIS TEST? I don't think we use this functionality anymore.
66- xit ( 'provides a listing of namespaces when provided a namespace definition' , async ( done ) => {
65+ xit ( 'provides a listing of namespaces when provided a namespace definition' , async ( ) => {
6766 const namespaceTriples = [
6867 {
6968 Subject : '/test/namespace/a' ,
@@ -95,10 +94,9 @@ describe('The MCWS Persistence Provider', () => {
9594
9695 const objects = await mcwsPersistenceProvider . getNamespacesFromMCWS ( { url : '/test/namespace' } ) ;
9796 expect ( objects ) . toEqual ( namespaceTriples ) ;
98- done ( ) ;
9997 } ) ;
10098
101- it ( 'allows objects to be created' , async ( done ) => {
99+ it ( 'allows objects to be created' , async ( ) => {
102100 mockOpaqueFile . create . and . returnValue ( Promise . resolve ( true ) ) ;
103101 const domainObject = {
104102 identifier : {
@@ -114,10 +112,9 @@ describe('The MCWS Persistence Provider', () => {
114112 . toHaveBeenCalledWith ( 'testKey' ) ;
115113 expect ( mockOpaqueFile . create )
116114 . toHaveBeenCalledWith ( { someKey : 'some value' } ) ;
117- done ( ) ;
118115 } ) ;
119116
120- it ( 'allows objects to be read' , async ( done ) => {
117+ it ( 'allows objects to be read' , async ( ) => {
121118 const identifier = {
122119 key : 'testKey' ,
123120 namespace : 'testSpace'
@@ -139,10 +136,9 @@ describe('The MCWS Persistence Provider', () => {
139136 . toHaveBeenCalledWith ( 'testKey' ) ;
140137 expect ( mockOpaqueFile . read )
141138 . toHaveBeenCalled ( ) ;
142- done ( ) ;
143139 } ) ;
144140
145- it ( 'allows objects to be updated' , async ( done ) => {
141+ it ( 'allows objects to be updated' , async ( ) => {
146142 mockOpaqueFile . replace . and . returnValue ( Promise . resolve ( true ) ) ;
147143 const domainObject = {
148144 identifier : {
@@ -160,11 +156,10 @@ describe('The MCWS Persistence Provider', () => {
160156 . toHaveBeenCalledWith ( 'testKey' ) ;
161157 expect ( mockOpaqueFile . replace )
162158 . toHaveBeenCalledWith ( { someKey : 'some value' } ) ;
163- done ( ) ;
164159 } ) ;
165160
166161 // We don't allow delete in the core API, so we don't need this test.
167- xit ( 'allows objects to be deleted' , async ( done ) => {
162+ xit ( 'allows objects to be deleted' , async ( ) => {
168163 mockOpaqueFile . remove . and . returnValue ( Promise . resolve ( true ) ) ;
169164 await mcwsPersistenceProvider . delete ( { key : 'testKey' , namespace : 'testSpace' } ) ;
170165
@@ -173,14 +168,12 @@ describe('The MCWS Persistence Provider', () => {
173168 expect ( mockNamespace . opaqueFile )
174169 . toHaveBeenCalledWith ( 'testKey' ) ;
175170 expect ( mockOpaqueFile . remove ) . toHaveBeenCalled ( ) ;
176- done ( ) ;
177171 } ) ;
178172
179- it ( 'converts rejected promises to promises resolves to undefined' , async ( done ) => {
173+ it ( 'converts rejected promises to promises resolves to undefined' , async ( ) => {
180174 mockOpaqueFile . read . and . returnValue ( Promise . reject ( 'hello' ) ) ;
181175 const result = await mcwsPersistenceProvider . get ( { key : 'testKey' , namespace : 'testSpace' } ) ;
182176
183177 expect ( result ) . toBeUndefined ( ) ;
184- done ( ) ;
185178 } ) ;
186179} ) ;
0 commit comments