Skip to content

Some unit tests in grpc-fallback fail silently #182

@leahecole

Description

@leahecole

Some of the tests in grpc-fallback that use proxyquire with node-fetch are failing silently, very similar to this bug mochajs/mocha#4881

tests that have blocks like this

 gaxGrpcMock
      .createStub(echoService, stubOptions)
      .then((echoStub: {echo: any}) => {
        echoStub.echo(requestObject, {}, {}, (err?: Error, result?: {}) => {
          assert.strictEqual(err, null);
          assert.strictEqual(
            requestObject.content,
            (result as {content: string}).content,
          );
        });
      });

Are failing to report an assertion error in the assert.strictEqual(err, null) line.

Update I removed this code snippet because I still didn't quite have it right with callbacks/async etc but I'll work on what needs to change. Might be missing a .then, might need an async/await swap with a try/catch

We should also fix why they're failing (I don't know that part yet) but I want to at least get to a loud failure instead of a silent one 😁

Metadata

Metadata

Assignees

Labels

size: mPull request size is medium.type: cleanupAn internal cleanup or hygiene concern.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions