// test string utils import assert from 'assert' import BigNumber from 'decimal.js' import math from '../../../src/bundleAny' import { endsWith, escape, format } from '../../../src/utils/string' describe('string', function () { it('endsWith', function () { assert.strictEqual(endsWith('hello', 'hello'), true) assert.strictEqual(endsWith('hello', 'lo'), true) assert.strictEqual(endsWith('hello', ''), true) assert.strictEqual(endsWith('hello!', 'lo'), false) assert.strictEqual(endsWith('hello', 'LO'), false) assert.strictEqual(endsWith('hello', 'hellohello'), false) }) it('should escape special HTML characters', function () { assert.strictEqual(escape('&<>"\''), '&<>"'') assert.strictEqual(escape('