config: try to coerce string values into numbers

This commit is contained in:
Patrik Oldsberg
2020-09-03 16:35:16 +02:00
parent 3877a50ce9
commit 265be1d6a1
3 changed files with 18 additions and 24 deletions
-21
View File
@@ -145,25 +145,4 @@ describe('loadConfig', () => {
},
]);
});
it('coerces port to a number', async () => {
await expect(
loadConfig({
rootPaths: ['/secret-port'],
env: 'production',
shouldReadSecrets: true,
}),
).resolves.toEqual([
{
context: 'app-config.yaml',
data: {
backend: {
listen: {
port: 12345,
},
},
},
},
]);
});
});