Skip to content

Commit

Permalink
fix: reverting nasty test trimming
Browse files Browse the repository at this point in the history
  • Loading branch information
wei3erHase committed Aug 21, 2024
1 parent 467f68b commit 8d516a7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/unit/DataFeed.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,18 @@ describe('DataFeed.sol', () => {
});

it('should emit PoolObserved', async () => {
observationData1 = [blockTimestamp1, arithmeticMeanTick1];
observationData2 = [blockTimestamp2, arithmeticMeanTick2];
observationsData = [observationData1, observationData2];

const tx = await dataFeed.connect(strategy).fetchObservations(randomSalt, secondsAgos);
let eventPoolSalt = await readArgFromEvent(tx, 'PoolObserved', '_poolSalt');
let eventPoolNonce = await readArgFromEvent(tx, 'PoolObserved', '_poolNonce');
let eventObservationsData = await readArgFromEvent(tx, 'PoolObserved', '_observationsData');

expect(eventPoolSalt).to.eq(randomSalt);
expect(eventPoolNonce).to.eq(nonce);
expect(eventObservationsData).to.eql(observationsData);
});
});

Expand Down Expand Up @@ -308,12 +314,18 @@ describe('DataFeed.sol', () => {
});

it('should emit PoolObserved', async () => {
observationData1 = [blockTimestamp1, arithmeticMeanTick1];
observationData2 = [blockTimestamp2, arithmeticMeanTick2];
observationsData = [observationData1, observationData2];

const tx = await dataFeed.connect(strategy).fetchObservations(randomSalt, secondsAgos);
let eventPoolSalt = await readArgFromEvent(tx, 'PoolObserved', '_poolSalt');
let eventPoolNonce = await readArgFromEvent(tx, 'PoolObserved', '_poolNonce');
let eventObservationsData = await readArgFromEvent(tx, 'PoolObserved', '_observationsData');

expect(eventPoolSalt).to.eq(randomSalt);
expect(eventPoolNonce).to.eq(nonce);
expect(eventObservationsData).to.eql(observationsData);
});
});
});
Expand Down

0 comments on commit 8d516a7

Please sign in to comment.