grpc-js-core: add missing space in error message

This commit adds a missing space to an error message and
updates a test to prevent regressions.
This commit is contained in:
cjihrig 2018-08-25 12:02:15 -04:00
parent 797bcbaffe
commit b64ed1c18e
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ function normalizeKey(key: string): string {
function validate(key: string, value?: MetadataValue): void {
if (!isLegalKey(key)) {
throw new Error('Metadata key"' + key + '" contains illegal characters');
throw new Error('Metadata key "' + key + '" contains illegal characters');
}
if (value != null) {
if (isBinaryKey(key)) {

View File

@ -52,7 +52,7 @@ describe('Metadata', () => {
});
assert.throws(() => {
metadata.set('key$', 'value');
});
}, /Error: Metadata key "key\$" contains illegal characters/);
assert.throws(() => {
metadata.set('', 'value');
});