github.com/stackb/rules_proto@v0.0.0-20240221195024-5428336c51f1/example/routeguide/closure/client_test.js (about) 1 goog.module('example.routeguide.closure.GrpcJsClientTest'); 2 3 goog.setTestOnly('example.routeguide.closure.GrpcJsClientTest'); 4 5 const Client = goog.require('proto.example.routeguide.RouteguideClient'); 6 const Rectangle = goog.require('proto.example.routeguide.Rectangle'); 7 8 const asserts = goog.require('goog.testing.asserts'); 9 const testSuite = goog.require('goog.testing.testSuite'); 10 11 goog.require('goog.testing.jsunit'); 12 13 testSuite({ 14 testListFeatures: () => { 15 const client = new Client(); 16 return client.getRouteGuide().listFeatures(new Rectangle(), feature => { 17 // no features should be returned so this should fail the test 18 asserts.assertNull(feature); 19 }); 20 }, 21 });