mirror of
https://github.com/video-dev/hls.js.git
synced 2026-06-16 13:34:44 +00:00
Signed-off-by: coatesjuan <juanco@qualabs.com> Signed-off-by: Felipe Young <felipey@qualabs.com> Signed-off-by: hernan <hernanr@qualabs.com> Signed-off-by: Fernando Cuadro <fernandoc@qualabs.com> Co-authored-by: Fernando Cuadro <fernandoc@qualabs.com> Co-authored-by: coatesjuan <juanco@qualabs.com> Co-authored-by: hernan <hernanr@qualabs.com> Co-authored-by: Felipe Young <121059628+fyoungqualabs@users.noreply.github.com> Co-authored-by: fernandocQualabs <126795603+fernandocQualabs@users.noreply.github.com>
16 lines
482 B
TypeScript
16 lines
482 B
TypeScript
import { expect } from 'chai';
|
|
import { utf8ArrayToStr } from '@svta/common-media-library/utils/utf8ArrayToStr';
|
|
|
|
describe('UTF8 tests', function () {
|
|
it('utf8ArrayToStr', function (done) {
|
|
const aB = new Uint8Array([97, 98]);
|
|
const aNullBNullC = new Uint8Array([97, 0, 98, 0, 99]);
|
|
|
|
expect(utf8ArrayToStr(aB)).to.equal('ab');
|
|
expect(utf8ArrayToStr(aNullBNullC)).to.equal('abc');
|
|
expect(utf8ArrayToStr(aNullBNullC, true)).to.equal('a');
|
|
|
|
done();
|
|
});
|
|
});
|