example.spec.ts 400 B

123456789101112131415161718
  1. import { describe, it, expect } from 'vitest'
  2. describe('Example Test Suite', () => {
  3. it('should pass a basic test', () => {
  4. expect(1 + 1).toBe(2)
  5. })
  6. it('should handle strings', () => {
  7. const str = 'Hello World'
  8. expect(str).toContain('World')
  9. })
  10. it('should handle arrays', () => {
  11. const arr = [1, 2, 3]
  12. expect(arr).toHaveLength(3)
  13. expect(arr).toContain(2)
  14. })
  15. })