test non-file
This commit is contained in:
		
							parent
							
								
									7acb9f196e
								
							
						
					
					
						commit
						7c8b23aa87
					
				
							
								
								
									
										6
									
								
								test.js
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								test.js
									
									
									
									
									
								
							@ -2,6 +2,12 @@
 | 
			
		||||
//var pyconf = require('pyconf');
 | 
			
		||||
var pyconf = require('./');
 | 
			
		||||
 | 
			
		||||
pyconf.readFile('doesnt-exist.conf', function (err, obj) {
 | 
			
		||||
  if (!err || obj) {
 | 
			
		||||
    console.error("didn't get an error (or also got an object) when testing on non-existant file");
 | 
			
		||||
    process.exit(1);
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
pyconf.readFile('example.conf', function (err, obj) {
 | 
			
		||||
  if (err) {
 | 
			
		||||
    console.error(err.stack);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user