smooth-text-rotator
Version:
Super simple JS library for rotating text with smooth animations
18 lines (13 loc) • 526 B
text/typescript
import {isArrayOfString} from "./type-guards";
test('should return true with an array of string', () => {
expect(isArrayOfString(['a', 'b'])).toBe(true);
});
test('should return false with something else than an array', () => {
expect(isArrayOfString('test')).toBe(false);
});
test('should return false with an array of numbers', () => {
expect(isArrayOfString([1, 2, 3])).toBe(false);
});
test('should return false with an array of mixed types', () => {
expect(isArrayOfString(['a', 1, 2, 'b'])).toBe(false);
});