Ad
  • Default User Avatar

    Test functions for javascript:

    // TODO: Add your tests here
    // Starting from Node 10.x, [Mocha](https://mochajs.org) is used instead of our custom test framework.
    // [Codewars' assertion methods](https://github.com/Codewars/codewars.com/wiki/Codewars-JavaScript-Test-Framework)
    // are still available for now.
    //
    // For new tests, using [Chai](https://chaijs.com/) is recommended.
    // You can use it by requiring:
    //     const assert = require("chai").assert;
    // If the failure output for deep equality is truncated, `chai.config.truncateThreshold` can be adjusted.
    
    describe("Solution", () => {
      it("should test for something", () => {
        Test.assertDeepEquals(anagrams("abba", ["aabb", "abcd", "bbaa", "dada"]), [
          "aabb",
          "bbaa",
        ]);
      });
    
      it("should test for something", () => {
        Test.assertDeepEquals(
          anagrams("racer", ["crazer", "carer", "racar", "caers", "racer"]),
          ["carer", "racer"]
        );
      });
    
      it("should test for something", () => {
        Test.assertDeepEquals(anagrams("laser", ["lazing", "lazy", "lacer"]), []);
      });
    });
    
  • Custom User Avatar

    not an issue ~ reread the instructions

  • Default User Avatar

    It appears in javascript there are issues with two of the test cases

    doTest([20,1,-1,2,-2,3,3,5,5,1,2,4,20,4,-1,-2,5], 5);
    doTest([20,1,1,2,2,3,3,5,5,4,20,4,5], 5);

    Expect the answer to be 5, but in both there are multiple 5s and in the instructions it said this would not be the case

  • Default User Avatar

    maybe tests are broken in the C#?

    I get an error that actual list contains 2 words while the expected result contains 5 words, and that the follwoing words are missing in the actual list: "abab", "baba", "baab"
    I run it localy on my visual studio and these 3 missing words are marked as anagrams when the input single word is 'abba'

    Is there a way to see the tests input (not the sampel tests) ?

  • Default User Avatar

    No tests for javascript

  • Default User Avatar

    Im getting this issue as well