mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
10 lines
188 B
Plaintext
10 lines
188 B
Plaintext
import {it, expect} from 'vitest'
|
|
|
|
export def add(...args)
|
|
return args.reduce((do(a, b) a + b), 0)
|
|
|
|
it "add", do
|
|
expect(add()).toBe 0
|
|
expect(add(1)).toBe 3
|
|
expect(add(1, 2, 3)).toBe 6
|