feat: add a first generic method, square (#10)
All checks were successful
/ test (push) Successful in 10s

Resolves #2.

Reviewed-on: #10
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
This commit is contained in:
Glen Whitney 2025-04-08 23:25:01 +00:00 committed by Glen Whitney
parent 1a6890f458
commit 05ff078529
7 changed files with 34 additions and 4 deletions

View file

@ -0,0 +1,11 @@
import assert from 'assert'
import math from '#nanomath'
describe('generic arithmetic', () => {
it('squares anything', () => {
assert.strictEqual(math.square(7), 49)
assert.strictEqual(
math.square.resolve([math.types.Number]).returns,
math.types.Number)
})
})