6
6
import FakeTimers from '@sinonjs/fake-timers'
7
7
8
8
import * as fixtures from './fixtures'
9
- import { MockCache } from '@chainlink/external-adapter-framework/util/testing-utils'
10
- import { runAllUntil } from '@chainlink/external-adapter-framework/util/testing-utils'
11
9
12
10
describe ( 'execute' , ( ) => {
13
11
let clock : FakeTimers . InstalledClock
@@ -107,7 +105,7 @@ describe('execute', () => {
107
105
} )
108
106
} )
109
107
110
- it . only ( 'returns ncfx if tradinghours is failing' , async ( ) => {
108
+ it ( 'returns ncfx if tradinghours is failing' , async ( ) => {
111
109
const market = 'test-4'
112
110
fixtures . mockTradinghoursError ( market )
113
111
fixtures . mockNCFXOpen ( market )
@@ -128,17 +126,17 @@ describe('execute', () => {
128
126
} )
129
127
} )
130
128
131
- it ( 'returns closed if tradinghours is failing and ncfx is failing' , async ( ) => {
129
+ it ( 'returns unknown if tradinghours is failing and ncfx is failing' , async ( ) => {
132
130
const market = 'test-5'
133
131
fixtures . mockTradinghoursError ( market )
134
132
fixtures . mockNCFXError ( market )
135
133
136
134
const response = await waitForSuccessfulRequest ( { market } )
137
135
expect ( response . json ( ) ) . toEqual ( {
138
136
data : {
139
- result : 1 ,
137
+ result : 0 ,
140
138
} ,
141
- result : 1 ,
139
+ result : 0 ,
142
140
statusCode : 200 ,
143
141
timestamps : {
144
142
providerDataReceivedUnixMs : expect . any ( Number ) ,
@@ -148,17 +146,17 @@ describe('execute', () => {
148
146
} )
149
147
} )
150
148
151
- it ( 'returns closed if tradinghours is failing and ncfx is unknown' , async ( ) => {
149
+ it ( 'returns unknown if tradinghours is failing and ncfx is unknown' , async ( ) => {
152
150
const market = 'test-6'
153
151
fixtures . mockTradinghoursError ( market )
154
152
fixtures . mockNCFXUnknown ( market )
155
153
156
154
const response = await waitForSuccessfulRequest ( { market } )
157
155
expect ( response . json ( ) ) . toEqual ( {
158
156
data : {
159
- result : 1 ,
157
+ result : 0 ,
160
158
} ,
161
- result : 1 ,
159
+ result : 0 ,
162
160
statusCode : 200 ,
163
161
timestamps : {
164
162
providerDataReceivedUnixMs : expect . any ( Number ) ,
0 commit comments