Skip to content

Commit 724ee5f

Browse files
authored
Merge pull request #1236 from finos/corrections-to-#1207-to-fix-broken-tests
Corrections to #1207 to fix broken tests
2 parents dcd98c2 + 5b3de39 commit 724ee5f

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

jest.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
module.exports = {
33
moduleFileExtensions: ["js", "ts"],
44
globals: {
5-
"ts-jest": {
6-
isolatedModules: true
7-
}
5+
86
},
97
transform: {
10-
"^.+\\.ts?$": "ts-jest"
8+
"^.+\\.ts?$": ["ts-jest", { isolatedModules: true }]
119
},
1210
testRegex: ".+\\.test\\.ts?$",
1311
testEnvironment: "jsdom",

src/api/Methods.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import {
1818
StandardContextType,
1919
StandardIntent,
2020
ContextType,
21+
FDC3EventType,
22+
EventHandler,
2123
} from '..';
2224
import { StandardContextsSet } from '../internal/contextConfiguration';
2325
import { StandardIntentsSet } from '../internal/intentConfiguration';
@@ -124,6 +126,10 @@ export function addContextListener(
124126
}
125127
}
126128

129+
export function addEventListener(eventType: FDC3EventType, handler: EventHandler): Promise<Listener> {
130+
return rejectIfNoGlobal(() => window.fdc3.addEventListener(eventType, handler));
131+
}
132+
127133
export function getUserChannels(): Promise<Channel[]> {
128134
return rejectIfNoGlobal(() => {
129135
//fallback to getSystemChannels for FDC3 <2.0 implementations

0 commit comments

Comments
 (0)