add tests for config/config and nodeEnv
This commit is contained in:
		
							
								
								
									
										13
									
								
								src/__tests__/config.test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								src/__tests__/config.test.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
import { config } from '../config/config.js';
 | 
			
		||||
 | 
			
		||||
describe('Configuration', () => {
 | 
			
		||||
  test('should load configuration successfully', () => {
 | 
			
		||||
    expect(config).toBeDefined();
 | 
			
		||||
    expect(config.mongodbUri).toBeDefined();
 | 
			
		||||
    expect(config.nodeEnv).toBeDefined();
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  test('should have valid environment', () => {
 | 
			
		||||
    expect(['development', 'production', 'test']).toContain(config.nodeEnv);
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
		Reference in New Issue
	
	Block a user