mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
polyfill Encoders to run tests
This commit is contained in:
parent
edb7738bf2
commit
d9a428730c
@ -10,4 +10,5 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
coverageReporters: ['lcov', 'text'],
|
coverageReporters: ['lcov', 'text'],
|
||||||
testMatch: ['**/src/**/?(*.)+(spec|test).js?(x)'],
|
testMatch: ['**/src/**/?(*.)+(spec|test).js?(x)'],
|
||||||
|
setupFilesAfterEnv: ['<rootDir>/test/setup.js']
|
||||||
}
|
}
|
||||||
|
|||||||
5
backend/test/setup.js
Normal file
5
backend/test/setup.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// Polyfill missing encoders in jsdom
|
||||||
|
// https://stackoverflow.com/questions/68468203/why-am-i-getting-textencoder-is-not-defined-in-jest
|
||||||
|
import { TextEncoder, TextDecoder } from 'util'
|
||||||
|
global.TextEncoder = TextEncoder
|
||||||
|
global.TextDecoder = TextDecoder
|
||||||
@ -10273,7 +10273,7 @@ tough-cookie@^4.1.2:
|
|||||||
tr46@^1.0.1:
|
tr46@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
|
resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
|
||||||
integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=
|
integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==
|
||||||
dependencies:
|
dependencies:
|
||||||
punycode "^2.1.0"
|
punycode "^2.1.0"
|
||||||
|
|
||||||
@ -10778,9 +10778,9 @@ whatwg-url@^11.0.0:
|
|||||||
webidl-conversions "^7.0.0"
|
webidl-conversions "^7.0.0"
|
||||||
|
|
||||||
whatwg-url@^7.0.0:
|
whatwg-url@^7.0.0:
|
||||||
version "7.0.0"
|
version "7.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd"
|
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06"
|
||||||
integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==
|
integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==
|
||||||
dependencies:
|
dependencies:
|
||||||
lodash.sortby "^4.7.0"
|
lodash.sortby "^4.7.0"
|
||||||
tr46 "^1.0.1"
|
tr46 "^1.0.1"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user