Skip to content

Help with setting up testing on my machine #2608

Answered by kazk
placoderm asked this question in Q&A
Discussion options

You must be logged in to vote

If you see Test. from old kata, you need @codewars/test-compat.

Install that with npm i -D @codewars/test-compat then:

const Test = require("@codewars/test-compat");
describe("Tests", () => {
  it("test", () => {
    Test.assertEquals(formatDuration(1), "1 second");
  });
});

You should be able to run the test with Mocha.

Also, Codewars currently concatenates solution and tests, so write your solution in the same file.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@thesunshade
Comment options

@kazk
Comment options

kazk Feb 19, 2022
Maintainer

@thesunshade
Comment options

@kazk
Comment options

kazk Feb 19, 2022
Maintainer

@thesunshade
Comment options

Answer selected by DonaldKellett
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants