You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					16 lines
				
				397 B
			
		
		
			
		
	
	
					16 lines
				
				397 B
			| 
											3 years ago
										 | import mongoose from 'mongoose' | ||
|  | import { Pesel, User, Article } from './models' | ||
|  | 
 | ||
|  | const dropAllCollections = async (): Promise<void> => { | ||
|  |   await mongoose.connect('mongodb://localhost/e2e_test', { | ||
|  |     useNewUrlParser: true, | ||
|  |     useUnifiedTopology: true, | ||
|  |   }) | ||
|  |   await Promise.all([ | ||
|  |     Pesel.deleteMany({}), | ||
|  |     User.deleteMany({}), | ||
|  |     Article.deleteMany({}), | ||
|  |   ]) | ||
|  | } | ||
|  | beforeEach(dropAllCollections) |