-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjestSetup.ts
30 lines (28 loc) · 875 Bytes
/
jestSetup.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// #!/usr/bin/env babel-node
// -*- coding: utf-8 -*-
/** @module webpackConfigurator */
'use strict'
/* !
region header
Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
License
-------
This library written by Torben Sickert stand under a creative commons
naming 3.0 unported license.
See https://creativecommons.org/licenses/by/3.0/deed.de
endregion
*/
// region imports
import {$Global, globalContext} from 'clientnode'
import {TextEncoder, TextDecoder} from 'util'
// endregion
;(globalContext as $Global & {TextEncoder: typeof TextEncoder}).TextEncoder =
TextEncoder
;(globalContext as $Global & {TextDecoder: typeof TextDecoder}).TextDecoder =
TextDecoder
try {
if ((eval('require') as typeof require)('jest-canvas-mock'))
console.info('Canvas mocking module loaded.')
} catch {
// Do nothing.
}