|
|
|
@ -19,7 +19,7 @@ import { filterKeys } from './common'; |
|
|
|
|
|
|
|
|
|
describe('unify-parser', () => { |
|
|
|
|
describe('thrift field', () => { |
|
|
|
|
it('should convert struct field extenstions', () => { |
|
|
|
|
it('should convert struct field extensions', () => { |
|
|
|
|
const content = ` |
|
|
|
|
enum Numbers { |
|
|
|
|
ONE = 1 |
|
|
|
@ -90,7 +90,7 @@ describe('unify-parser', () => { |
|
|
|
|
return expect(extensionConfigs).to.eql(expected); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should convert union field extenstions', () => { |
|
|
|
|
it('should convert union field extensions', () => { |
|
|
|
|
const content = ` |
|
|
|
|
union Foo { |
|
|
|
|
1: string k1 (api.position = "query") |
|
|
|
@ -109,7 +109,7 @@ describe('unify-parser', () => { |
|
|
|
|
return expect(extensionConfigs).to.eql(expected); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should convert struct field extenstions using agw specification', () => { |
|
|
|
|
it('should convert struct field extensions using agw specification', () => { |
|
|
|
|
const content = ` |
|
|
|
|
struct Foo { |
|
|
|
|
1: string k1 (agw.source = 'query') |
|
|
|
@ -146,7 +146,7 @@ describe('unify-parser', () => { |
|
|
|
|
return expect(extensionConfigs).to.eql(expected); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should convert struct field extenstions using golang tag', () => { |
|
|
|
|
it('should convert struct field extensions using golang tag', () => { |
|
|
|
|
const content = ` |
|
|
|
|
struct Foo { |
|
|
|
|
1: string k1 (go.tag = "json:\\"key1\\"") |
|
|
|
@ -432,7 +432,7 @@ describe('unify-parser', () => { |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('proto field', () => { |
|
|
|
|
it('should convert message field extenstions', () => { |
|
|
|
|
it('should convert message field extensions', () => { |
|
|
|
|
const content = ` |
|
|
|
|
syntax = "proto3"; |
|
|
|
|
enum Numbers { |
|
|
|
@ -499,7 +499,7 @@ describe('unify-parser', () => { |
|
|
|
|
return expect(extensionConfigs).to.eql(expected); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should convert message field extenstions using old rules', () => { |
|
|
|
|
it('should convert message field extensions using old rules', () => { |
|
|
|
|
const content = ` |
|
|
|
|
syntax = "proto3"; |
|
|
|
|
message Foo { |
|
|
|
@ -535,7 +535,7 @@ describe('unify-parser', () => { |
|
|
|
|
return expect(extensionConfigs).to.eql(expected); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should convert message field extenstions with error', () => { |
|
|
|
|
it('should convert message field extensions with error', () => { |
|
|
|
|
const content = ` |
|
|
|
|
syntax = "proto3"; |
|
|
|
|
message Foo { |
|
|
|
|