@deephaven/mocks 0.19.2-beta.10 → 0.19.2-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/mocks",
3
- "version": "0.19.2-beta.10+75204ed",
3
+ "version": "0.19.2-beta.12+12ab02d",
4
4
  "description": "Deephaven Mocks for common libraries",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,5 +17,5 @@
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
- "gitHead": "75204eda3d72f91ad80215af6177927ae1bea1ac"
20
+ "gitHead": "12ab02d7174c9dd99142551829d93ca7b18bc02d"
21
21
  }
package/src/index.js CHANGED
@@ -1,4 +1,3 @@
1
- export { default as GoldenLayout } from './golden-layout';
2
1
  export { default as LodashThrottle } from './lodash.throttle';
3
2
  export { default as LodashDebounce } from './lodash.debounce';
4
3
  export { default as PouchDbBrowser } from './pouchdb-browser';
@@ -1,54 +0,0 @@
1
- /* eslint-disable class-methods-use-this */
2
- /* eslint-disable max-classes-per-file */
3
-
4
- class EventHub {
5
- listeners = [];
6
-
7
- on = jest.fn((name, callback) => {
8
- this.listeners.push({ name, callback });
9
- });
10
-
11
- off = jest.fn((name, callback) => {
12
- this.listeners = this.listeners.filter(
13
- listener => listener.name !== name || listener.callback !== callback
14
- );
15
- });
16
-
17
- emit = jest.fn((name, ...args) => {
18
- this.listeners.forEach(listener => {
19
- if (listener.name === name) {
20
- listener.callback(...args);
21
- }
22
- });
23
- });
24
- }
25
-
26
- class LayoutRoot extends EventHub {
27
- addChild = jest.fn();
28
-
29
- removeChild = jest.fn();
30
-
31
- contentItems = [];
32
- }
33
-
34
- export class GoldenLayout extends EventHub {
35
- destroy = jest.fn();
36
-
37
- init = jest.fn(() => {
38
- this.listeners.forEach(({ name, callback }) => {
39
- if (name === 'initialised') {
40
- callback();
41
- }
42
- });
43
- });
44
-
45
- eventHub = new EventHub();
46
-
47
- root = new LayoutRoot();
48
-
49
- registerComponent = jest.fn(() => () => undefined);
50
-
51
- setFallbackComponent = jest.fn();
52
- }
53
-
54
- export default GoldenLayout;