Advertisement
EnTGeA

Javascript filter -3: Example Test Cases

Nov 25th, 2021
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const chai = require("chai");
  2. const assert = chai.assert;
  3. chai.config.truncateThreshold = 0;
  4.  
  5. describe( "Testing a list", function(){
  6.   it( "Basic list", function(){
  7.     const a = [ "foo", "foo@foo.com", "bar.", "bar@bar.com" ],
  8.     b = [ "bar@bar.com" ];
  9.     assert.deepEqual( searchNames( a ), b,
  10.       `Testing for ${JSON.stringify(a)}`)
  11.   } );
  12. } );
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement