diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-19 23:13:57 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-19 23:13:57 +0300 |
commit | fa04b50b3c84e69765df7a0c9a182d9709ade398 (patch) | |
tree | 50af2b45cca9271715077c24222b4c671d0cb086 /spec/javascripts/raven/index_spec.js | |
parent | 9d29eb7e292067fb980b4ca97fc6c3edac1dccec (diff) |
Read HEAD commit and use as releases value
Diffstat (limited to 'spec/javascripts/raven/index_spec.js')
-rw-r--r-- | spec/javascripts/raven/index_spec.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/spec/javascripts/raven/index_spec.js b/spec/javascripts/raven/index_spec.js index b5662cd0331..e8fe6b32c43 100644 --- a/spec/javascripts/raven/index_spec.js +++ b/spec/javascripts/raven/index_spec.js @@ -2,18 +2,14 @@ import RavenConfig from '~/raven/raven_config'; import index from '~/raven/index'; describe('RavenConfig options', () => { - let sentryDsn; - let currentUserId; - let gitlabUrl; - let isProduction; + const sentryDsn = 'sentryDsn'; + const currentUserId = 'currentUserId'; + const gitlabUrl = 'gitlabUrl'; + const isProduction = 'isProduction'; + const headCommitSHA = 'headCommitSHA'; let indexReturnValue; beforeEach(() => { - sentryDsn = 'sentryDsn'; - currentUserId = 'currentUserId'; - gitlabUrl = 'gitlabUrl'; - isProduction = 'isProduction'; - window.gon = { sentry_dsn: sentryDsn, current_user_id: currentUserId, @@ -21,6 +17,7 @@ describe('RavenConfig options', () => { }; process.env.NODE_ENV = isProduction; + process.env.HEAD_COMMIT_SHA = headCommitSHA; spyOn(RavenConfig, 'init'); @@ -33,6 +30,10 @@ describe('RavenConfig options', () => { currentUserId, whitelistUrls: [gitlabUrl], isProduction, + release: headCommitSHA, + tags: { + HEAD_COMMIT_SHA: headCommitSHA, + }, }); }); |