Ad
  • Custom User Avatar

    no, you're looking at the wrong input. logs appear above the related assertion.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom 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

    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

    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

    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

    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

    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

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    You are changing the value of the array in the return?

  • Custom User Avatar

    I logged the parens, and it seems when I am using JavaScript the test whose input is ')' is expected a true. Does anyone have the same problem?

  • Custom User Avatar

    Hey, it seems that the test function for JavaScript doesn't work. Attempting and submission work fine.