UNPKG

2ch-trip

Version:

2ch compatible trip generator

61 lines (60 loc) 3.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const vitest_1 = require("vitest"); const index_1 = require("./index"); (0, vitest_1.describe)('10 Digits', () => { (0, vitest_1.test)('The trip key include only singlebyte characters', () => { (0, vitest_1.expect)((0, index_1.createTrip)('#Jim')).toBe(' ◆ziib4d/boU'); }); (0, vitest_1.test)('The trip key include only multibyte characters (hiragana)', () => { (0, vitest_1.expect)((0, index_1.createTrip)('#ひろゆき')).toBe(' ◆F7aSjnRHGU'); }); (0, vitest_1.test)('The trip key include only multibyte characters (emoji)', () => { (0, vitest_1.expect)((0, index_1.createTrip)('#🇯🇵')).toBe(' ◆K9zUBOq4IzsD'); }); }); (0, vitest_1.describe)('12 Digits', () => { (0, vitest_1.test)('The trip key include only singlebyte characters', () => { (0, vitest_1.expect)((0, index_1.createTrip)('#N.T.Technology')).toBe(' ◆FG0WWassNUrw'); }); (0, vitest_1.test)('The trip key include only multibyte characters (hiragana)', () => { (0, vitest_1.expect)((0, index_1.createTrip)('#パケットモンスター')).toBe(' ◆EZSPRAHOnqfS'); }); (0, vitest_1.test)('The trip key include only multibyte characters (emoji)', () => { (0, vitest_1.expect)((0, index_1.createTrip)('#🇯🇵🇯🇵')).toBe(' ◆pD8dlc9B7Wif'); }); (0, vitest_1.test)('The trip include dot', () => { (0, vitest_1.expect)((0, index_1.createTrip)('#ドットが入るトリ')).toBe(' ◆n2HxTwBby.Ar'); }); }); (0, vitest_1.describe)('Raw', () => { (0, vitest_1.test)('The trip key include only hexadecimal', () => { (0, vitest_1.expect)((0, index_1.createTrip)('##57414b5554454b41')).toBe(' ◆sWERuZlbhs'); }); (0, vitest_1.test)('The trip for the future expansion', () => { (0, vitest_1.expect)((0, index_1.createTrip)('#$4d45534849554d41')).toBe(' ◆???'); }); }); (0, vitest_1.describe)('Sharps', () => { (0, vitest_1.test)('The sharp is singlebyte string', () => { (0, vitest_1.expect)((0, index_1.createTrip)('#半角シャープ')).toBe(' ◆UfNdqf7SBKdu'); }); (0, vitest_1.test)('The sharp is multibyte string', () => { (0, vitest_1.expect)((0, index_1.createTrip)('#全角シャープ')).toBe(' ◆WcKp0EJvexJP'); }); }); (0, vitest_1.describe)('Others', () => { (0, vitest_1.test)('The trip key include whitespace', () => { (0, vitest_1.expect)((0, index_1.createTrip)('#ホワイト スペース')).toBe(' ◆7CqLoauBLfFu'); }); }); (0, vitest_1.describe)('No trip', () => { (0, vitest_1.test)('The trip key is not defined', () => { (0, vitest_1.expect)((0, index_1.createTrip)('名無しさん@お腹いっぱい。')).toBe('名無しさん@お腹いっぱい。'); }); }); (0, vitest_1.describe)('Options', () => { (0, vitest_1.test)('Hide whitespace', () => { (0, vitest_1.expect)((0, index_1.createTrip)('#未来検索ブラジル', { hideWhitespace: true })).toBe('◆6hXUlBS0slkc'); }); });