Ad
  • Custom User Avatar
    • No random tests

    • JS Node 18. with chai framework should be used

  • Custom User Avatar

    reusability/purity is not specified/tested: what should happen for a test like this ?

    it('reusability', function() {
      const chain = lazyChain([1, 2, 3]);
      const once  = chain.invoke('map', x => x * x);
      const twice = chain.invoke('map', x => x * x);
      // [1, 16, 81] or [1, 4, 9] ?
      Test.assertSimilar(once.value(), [1, 4, 9]);
      Test.assertSimilar(twice.value(), [1, 4, 9]);
    });