So I'm trying to run a tests.js for a python code I've written, everything seems fine however at the end of each line ("\n" character), the tests.js file is appending a "·" character. The file internally uses the toString() method to convert the python output to a string and then compares it with the expected string using toEqual().
My code:
def print_help():
print("""Usage :-
$ ./task add 2 hello world # Add a new item with priority 2 and text "hello world" to the list
$ ./task ls # Show incomplete priority list items sorted by priority in ascending order
$ ./task del INDEX # Delete the incomplete item with the given index
$ ./task done INDEX # Mark the incomplete item with the given index as complete
$ ./task help # Show usage
$ ./task report # Statistics""", end="")
The tests.js code:
test("prints help", () => {
let received = execSync(tasksTxtCli("help")).toString("utf8");
expect(received).toEqual(expect.stringContaining(usage));
});
