import { describe, expect, it } from 'vitest';
import { sortArray } from './SortArray';

describe('sortArray', () => {
  it('should sort numeric values', () => {
    const array = [100, 20, 12, 54, 4, 57, 76];

    expect(sortArray(array)).toEqual([4, 12, 20, 54, 57, 76, 100]);
  });

  it('should sort string values', () => {
    const array = ['zh', 'en', 'ee', 'fr', 'ar', 'ja', 'ru'];

    expect(sortArray(array)).toEqual([
      'ar',
      'ee',
      'en',
      'fr',
      'ja',
      'ru',
      'zh',
    ]);
  });
});
