Test pure functions

PHOTO EMBED

Tue Feb 09 2021 08:38:12 GMT+0000 (UTC)

Saved by @noobj

const assert = require('assert');

const add = (a, b) => a + b;

assert(add(2, 3) === 5);
assert(add(2, 3) <= 6);
assert(add(2, 3) != 10);
content_copyCOPY