mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2024-12-29 10:13:36 +01:00
11 lines
378 B
TypeScript
11 lines
378 B
TypeScript
// This code is to resolve errors on tootParser.spec.
|
|
// TextEncoder and TextDecoder are used in jsdom, but these object is defined in Browser js.
|
|
import { TextEncoder, TextDecoder } from 'util'
|
|
if (typeof global.TextEncoder === 'undefined') {
|
|
global.TextEncoder = TextEncoder
|
|
}
|
|
|
|
if (typeof global.TextDecoder === 'undefined') {
|
|
;(global.TextDecoder as any) = TextDecoder
|
|
}
|