fix path for loading test_service proto

This commit is contained in:
Robert 2021-11-05 19:59:03 -07:00
parent c4d7fab13e
commit 96ae102eaf
1 changed files with 2 additions and 5 deletions

View File

@ -35,15 +35,12 @@ import { ProtoGrpcType as TestServiceGrpcType } from './generated/test_service';
import { Request__Output } from './generated/Request'; import { Request__Output } from './generated/Request';
import { CompressionAlgorithms } from '../src/compression-algorithms'; import { CompressionAlgorithms } from '../src/compression-algorithms';
const loadedTestServiceProto = protoLoader.loadSync('test/fixtures/test_service.proto', { const loadedTestServiceProto = protoLoader.loadSync(path.join(__dirname, 'fixtures/test_service.proto'), {
keepCase: true, keepCase: true,
longs: String, longs: String,
enums: String, enums: String,
defaults: true, defaults: true,
oneofs: true, oneofs: true
includeDirs: [
`${__dirname}/../../proto`
]
}); });
const testServiceGrpcObject = grpc.loadPackageDefinition(loadedTestServiceProto) as unknown as TestServiceGrpcType; const testServiceGrpcObject = grpc.loadPackageDefinition(loadedTestServiceProto) as unknown as TestServiceGrpcType;