mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-03 19:36:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			474 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			474 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
'use strict';
 | 
						|
 | 
						|
const response = require('../helpers/context').response;
 | 
						|
 | 
						|
describe('res.writable', function () {
 | 
						|
  it('should return the request is writable', function () {
 | 
						|
    const res = response();
 | 
						|
    res.writable.should.be.ok;
 | 
						|
  });
 | 
						|
 | 
						|
  describe('when res.socket not present', function () {
 | 
						|
    it('should return the request is not writable', function () {
 | 
						|
      const res = response();
 | 
						|
      res.res.socket = null;
 | 
						|
      res.writable.should.not.be.ok;
 | 
						|
    });
 | 
						|
  });
 | 
						|
});
 |