Files
Auuki/test/jest-setup.js
Dimitar Marinov cc6cb7181a add basic support for open bike control (#316)
* add connection and basic parsing for open bike control

* add virtual shifting ui, state and tests

* update node/npm setup

* add basic support for training controls
2026-10-30 16:40:41 +02:00

12 lines
389 B
JavaScript

// Jest's pretend browser window does not include Node's text encoder.
// The jsdom package asks for it the moment a test imports it.
const { TextDecoder, TextEncoder } = require('node:util');
if (typeof globalThis.TextEncoder === 'undefined') {
globalThis.TextEncoder = TextEncoder;
}
if (typeof globalThis.TextDecoder === 'undefined') {
globalThis.TextDecoder = TextDecoder;
}