diff options
Diffstat (limited to 'spec/frontend/helpers')
-rw-r--r-- | spec/frontend/helpers/monitor_helper_spec.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/frontend/helpers/monitor_helper_spec.js b/spec/frontend/helpers/monitor_helper_spec.js index c36b603b251..0798ca580e2 100644 --- a/spec/frontend/helpers/monitor_helper_spec.js +++ b/spec/frontend/helpers/monitor_helper_spec.js @@ -81,6 +81,17 @@ describe('monitor helper', () => { expect(result.name).toEqual('brpop, brpop'); }); + it('supports hyphenated template variables', () => { + const config = { ...defaultConfig, name: 'expired - {{ test-attribute }}' }; + + const [result] = monitorHelper.makeDataSeries( + [{ metric: { 'test-attribute': 'test-attribute-value' }, values: series }], + config, + ); + + expect(result.name).toEqual('expired - test-attribute-value'); + }); + it('updates multiple series names from templates', () => { const config = { ...defaultConfig, |