refactor(backend): Types
This commit is contained in:
		
							parent
							
								
									6ad7fbf208
								
							
						
					
					
						commit
						25f9eb2af2
					
				
					 31 changed files with 92 additions and 86 deletions
				
			
		|  | @ -25,7 +25,7 @@ export function expectToBeCorrectEntity<T extends object>(actual: { entity: T; n | |||
|             expected.entity[property] !== undefined && // If we don't expect a certain value for a property, we assume it can be filled in by the database however it wants.
 | ||||
|             typeof expected.entity[property] !== 'function' // Functions obviously are not persisted via the database
 | ||||
|         ) { | ||||
|             if (!actual.entity.hasOwnProperty(property)) { | ||||
|             if (!Object.prototype.hasOwnProperty.call(actual.entity, property)) { | ||||
|                 throw new AssertionError({ | ||||
|                     message: `${expected.name} has defined property ${property}, but ${actual.name} is missing it.`, | ||||
|                 }); | ||||
|  |  | |||
		Reference in a new issue