<commit_before>var utyls = require('./');
var assert=require('chai').assert;

 var utobj=new utyls(); 
 
 //Tests for isChar
//TODO: Add More Tests eg: Create a custom datatype and try to pass it.
describe('Tests for isChar->',function(){
   
  
it('Passes Integer',function(){
    
   assert.equal(utobj.isChar(7),false,""); 
    
});

it('Passes Char',function(){
    
   assert.equal(utobj.isChar('g'),true,"");  
    
});


it('Passes String',function(){
   
   
   assert.equal(utobj.isChar('string'),false,"")
    
});


it('Passes float/double',function(){
   
   
   assert.equal(utobj.isChar(5.67),false,"");
    
});
});


//Tests for isInteger


describe("Tests for isInteger->",function(){
   
   it("Passes char",function(){
      
      
      assert.equal(utobj.isInteger('7'),false,"");
       
   });
   
   
   it("Passes String",function(){
      
      assert.equal(utobj.isInteger("787"),false,"");
       
   });
   
   
   it("Passes double/float",function(){
      
      assert.equal(utobj.isInteger(6.78),false,"");
       
   });
   
   it("Passes Integer",function(){
      
      assert.equal(utobj.isInteger(7),true,"");
       
   });
   
   
   
   
   
   
    
});


//TODO: Need More Tests to be written

describe("Tests for leftpad",function(){
   
   it("Without default arguement",function(){
      
       assert.equal(utobj.leftpad("7",3),"**7","");   
   });
   
   it("With default arguement",function(){
      
       assert.equal(utobj.leftpad("7",3,"0"),"007","");
       
   });
   
   it("Passes required length less than string length",function(){
      
      assert.equal(utobj.leftpad("788",2,"6"),"788","");
       
   });
   
   
   it("Passes a string instead of padding character",()=>{
      
      assert.equal(utobj.leftpad("776",10,"607"),undefined,"") ;
   });
   
   it("Passes negative length as required  length",()=>{
      
      assert.equal(utobj.leftpad("gha",-9),"gha","");
       
   });
   
   
   it("Passes empty string ",()=>{
       
      assert.equal(utobj.leftpad("",10),"**********",""); 
   });
   
   it("String and required length",()=>{<commit_msg>Added More Unit Tests for leftpad<commit_after>var utyls = require('./');
var assert=require('chai').assert;

 var utobj=new utyls(); 
 
 //Tests for isChar
//TODO: Add More Tests eg: Create a custom datatype and try to pass it.
describe('Tests for isChar->',function(){
   
  
it('Passes Integer',function(){
    
   assert.equal(utobj.isChar(7),false,""); 
    
});

it('Passes Char',function(){
    
   assert.equal(utobj.isChar('g'),true,"");  
    
});


it('Passes String',function(){
   
   
   assert.equal(utobj.isChar('string'),false,"")
    
});


it('Passes float/double',function(){
   
   
   assert.equal(utobj.isChar(5.67),false,"");
    
});
});


//Tests for isInteger


describe("Tests for isInteger->",function(){
   
   it("Passes char",function(){
      
      
      assert.equal(utobj.isInteger('7'),false,"");
       
   });
   
   
   it("Passes String",function(){
      
      assert.equal(utobj.isInteger("787"),false,"");
       
   });
   
   
   it("Passes double/float",function(){
      
      assert.equal(utobj.isInteger(6.78),false,"");
       
   });
   
   it("Passes Integer",function(){
      
      assert.equal(utobj.isInteger(7),true,"");
       
   });
   
   
   
   
   
   
    
});


//TODO: Need More Tests to be written

describe("Tests for leftpad",function(){
   
   it("Without default arguement",function(){
      
       assert.equal(utobj.leftpad("7",3),"**7","");   
   });
   
   it("With default arguement",function(){
      
       assert.equal(utobj.leftpad("7",3,"0"),"007","");
       
   });
   
   it("Passes required length less than string length",function(){
      
      assert.equal(utobj.leftpad("788",2,"6"),"788","");
       
   });
   
   
   it("Passes a string instead of padding character",function(){
      
      assert.equal(utobj.leftpad("776",10,"607"),undefined,"") ;
   });
   
   it("Passes negative length as required  length",function(){
      
      assert.equal(utobj.leftpad("gha",-9),"gha","");
       
   });
   
   
   it("Passes empty string ",function(){
       
      assert.equal(utobj.leftpad("",10),"**********",""); 
   });
   
   it("String and required length",function(){
{'fraction_non_alphanumeric': 0.20018578727357175, 'fraction_numerical': 0.018578727357176035, 'mean_word_length': 2.507328990228013, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1381939', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1432, 'n_words': 219}