Skip to content

Instantly share code, notes, and snippets.

@khaosdoctor
Created May 16, 2022 18:51
Show Gist options
  • Save khaosdoctor/90a924fcf4691022ac165e9309ab188b to your computer and use it in GitHub Desktop.
Save khaosdoctor/90a924fcf4691022ac165e9309ab188b to your computer and use it in GitHub Desktop.
import { add } from './function.mjs'
import assert from 'node:assert'
let result = add(1, 2)
assert.equal(result, 3, 'add(1, 2) should return 3')
result = add(1, '2')
assert.equal(result, 3, 'add(1, "2") should not return 3')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment