mirror of
				https://github.com/CommunitySolidServer/CommunitySolidServer.git
				synced 2024-10-03 14:55:10 +00:00 
			
		
		
		
	 b3f292d718
			
		
	
	
		b3f292d718
		
			
		
	
	
	
	
		
			
			* feat: added resourceExists method to ResourceStore * Merge remote-tracking branch 'origin/main' into feat/add-resourceExists-method-to-ResourceStore * fix: adapted to review * fix: adapted to review
		
			
				
	
	
		
			32 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { BaseResourceStore } from '../../../src/storage/BaseResourceStore';
 | |
| import { NotImplementedHttpError } from '../../../src/util/errors/NotImplementedHttpError';
 | |
| 
 | |
| const any: any = {};
 | |
| 
 | |
| describe('A BaseResourceStore', (): void => {
 | |
|   const store = new BaseResourceStore();
 | |
|   it('errors on getRepresentation.', async(): Promise<void> => {
 | |
|     await expect(store.getRepresentation(any, any)).rejects.toThrow(NotImplementedHttpError);
 | |
|   });
 | |
| 
 | |
|   it('errors on addResource.', async(): Promise<void> => {
 | |
|     await expect(store.addResource(any, any)).rejects.toThrow(NotImplementedHttpError);
 | |
|   });
 | |
| 
 | |
|   it('errors on setRepresentation.', async(): Promise<void> => {
 | |
|     await expect(store.setRepresentation(any, any)).rejects.toThrow(NotImplementedHttpError);
 | |
|   });
 | |
| 
 | |
|   it('errors on deleteResource.', async(): Promise<void> => {
 | |
|     await expect(store.deleteResource(any, any)).rejects.toThrow(NotImplementedHttpError);
 | |
|   });
 | |
| 
 | |
|   it('errors on modifyResource.', async(): Promise<void> => {
 | |
|     await expect(store.modifyResource(any, any)).rejects.toThrow(NotImplementedHttpError);
 | |
|   });
 | |
| 
 | |
|   it('errors on resourceExists.', async(): Promise<void> => {
 | |
|     await expect(store.resourceExists(any)).rejects.toThrow(NotImplementedHttpError);
 | |
|   });
 | |
| });
 |