Commit 6bd45de
authored
fix (unit tests): Fix event dispatcher missing in unit test (#256)
Summary:
Optimizely was constructed without an event dispatcher, causing an error to be thrown asynchronously. This fixes the test, and updates the npm test command to make it easier to catch such mistakes - adding a listener for 'unhandledRejection' on process that calls process.exit.
Test plan:
Run unit tests, verify log output.1 parent dd8c502 commit 6bd45de
File tree
3 files changed
+29
-1
lines changed- packages/optimizely-sdk
- lib
- optimizely
- tests
3 files changed
+29
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2451 | 2451 | | |
2452 | 2452 | | |
2453 | 2453 | | |
| 2454 | + | |
2454 | 2455 | | |
2455 | 2456 | | |
2456 | 2457 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments