13 lines
447 B
JavaScript
13 lines
447 B
JavaScript
import { chars, importDefaultForRuntime, is_ascii, ITestBase } from './mod.ts';
|
|
|
|
const t: ITestBase = await importDefaultForRuntime('test_base');
|
|
|
|
t.test('chars fn properly splits strings into unicode characters', () => {
|
|
t.assertEquals(chars('😺😸😹'), ['😺', '😸', '😹']);
|
|
});
|
|
|
|
t.test('is_ascii properly descerns ascii chars', () => {
|
|
t.assertTrue(is_ascii('asjyverkjhsdf1928374'));
|
|
t.assertFalse(is_ascii('😺acalskjsdf'));
|
|
});
|