Skip to content

Commit 392787a

Browse files
djwhittclaude
andcommitted
style: fix prettier formatting in observer tests
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 1e2d578 commit 392787a

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/observer.test.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,6 @@ describe('Observer', function () {
858858
expect(result.failureReason).to.equal('Missing or empty data_path');
859859
});
860860

861-
862861
it('should reject data_path that decodes to empty proof', function () {
863862
const chunkResponse = {
864863
chunk: 'dGVzdC1jaHVuaw',
@@ -931,12 +930,10 @@ describe('Observer', function () {
931930

932931
it('should fail fast on invalid chunk data', async function () {
933932
// Mock chunk endpoint returning invalid data
934-
nock('https://test-gateway.com')
935-
.get('/chunk/12345')
936-
.reply(200, {
937-
chunk: '', // Empty chunk - should fail quick validation
938-
data_path: 'dGVzdA',
939-
});
933+
nock('https://test-gateway.com').get('/chunk/12345').reply(200, {
934+
chunk: '', // Empty chunk - should fail quick validation
935+
data_path: 'dGVzdA',
936+
});
940937

941938
const result = await (observer as any).validateChunkAtOffset({
942939
targetHost: 'test-gateway.com',
@@ -968,7 +965,9 @@ describe('Observer', function () {
968965

969966
it('should handle successful validation with reference gateway available', async function () {
970967
// Mock the validatePath function to return success
971-
const mockValidatePath = sinon.stub().resolves(Buffer.from('validated-data'));
968+
const mockValidatePath = sinon
969+
.stub()
970+
.resolves(Buffer.from('validated-data'));
972971

973972
// Need to mock the arweave module - this is tricky, let's skip the actual validatePath test for now
974973
// and focus on the flow without the final validation step
@@ -1003,7 +1002,9 @@ describe('Observer', function () {
10031002
// Due to binary search failure, validation will fail, but we can verify reference gateway was checked
10041003
expect(result.pass).to.be.false;
10051004
expect(result.referenceGatewayAvailable).to.be.true; // Reference gateway should be available
1006-
expect(result.failureReason).to.contain('Missing validation components');
1005+
expect(result.failureReason).to.contain(
1006+
'Missing validation components',
1007+
);
10071008
});
10081009

10091010
it('should handle reference gateway unavailable', async function () {
@@ -1019,9 +1020,7 @@ describe('Observer', function () {
10191020
});
10201021

10211022
// Mock reference gateway as unavailable
1022-
nock('https://arweave.net')
1023-
.get('/chunk/12345')
1024-
.reply(404);
1023+
nock('https://arweave.net').get('/chunk/12345').reply(404);
10251024

10261025
const result = await (observer as any).validateChunkAtOffset({
10271026
targetHost: 'test-gateway.com',

0 commit comments

Comments
 (0)