File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ export default {
33 coverageDirectory : 'coverage' ,
44 preset : 'ts-jest/presets/js-with-babel' ,
55 testEnvironment : 'jsdom' ,
6+ setupFiles : [ './test/helpers/globals.js' ] ,
67 testEnvironmentOptions : {
78 customExportConditions : [ 'node' ]
89 } ,
Original file line number Diff line number Diff line change 1+ const { TextEncoder, TextDecoder } = require ( 'util' )
2+
3+ // Some transitive deps (solid-logic) use TextEncoder at module-load time.
4+ global . TextEncoder = TextEncoder
5+ global . TextDecoder = TextDecoder
6+ globalThis . TextEncoder = TextEncoder
7+ globalThis . TextDecoder = TextDecoder
8+
9+ const rdf = require ( 'rdflib' )
10+ const solidLogic = require ( 'solid-logic' )
11+
12+ // solid-ui's UMD bundle expects a browser-style global named $rdf.
13+ global . $rdf = rdf
14+ globalThis . $rdf = rdf
15+ if ( typeof window !== 'undefined' ) {
16+ window . $rdf = rdf
17+ }
18+
19+ // solid-ui's UMD bundle also expects a browser-style global named SolidLogic.
20+ global . SolidLogic = solidLogic
21+ globalThis . SolidLogic = solidLogic
22+ if ( typeof window !== 'undefined' ) {
23+ window . SolidLogic = solidLogic
24+ }
You can’t perform that action at this time.
0 commit comments