should_return_1=_=>-~!_
def should_return_1():x = 12354234 - 12354233return x- should_return_1=_=>-~!_
describe('Test', () => it('Is 1', () => should_return_1() === 1));
test.assert_equals(should_return_1(), 1)- describe('Test', () => it('Is 1', () => should_return_1() === 1));
const addArr = arr => arr.reduce((a, b) => a + b, 0) || null;
function addArr(arr){if(arr.length === 0) return nulllet final = 0arr.forEach(num => {final += num})return final}- const addArr = arr => arr.reduce((a, b) => a + b, 0) || null;
const chai = require("chai"); const assert = chai.assert; describe("Solution", function() { it("should test for something", function() { assert.strictEqual(addArr([1, 2, 3, 4, 5]), 15); assert.strictEqual(addArr([1, 100]), 101) assert.strictEqual(addArr([]), null) }); });
- const chai = require("chai");
- const assert = chai.assert;
- describe("Solution", function() {
- it("should test for something", function() {
- assert.strictEqual(addArr([1, 2, 3, 4, 5]), 15);
- assert.strictEqual(addArr([1, 100]), 101)
- assert.strictEqual(addArr([]), null)
- });
- });