diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2017-06-30 20:55:09 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2017-06-30 20:55:09 +0000 |
commit | e48f54b5b23b4b865a4462151d576d2ff09d543e (patch) | |
tree | ff73231294c1ac2c6793fc9a46f3e93c88cd9734 /spec/javascripts | |
parent | 30c7fef03955bb4d2627b1de419be672c97a6df6 (diff) | |
parent | 598baa554c29c7f69191b4ea46a049c558c3dbe5 (diff) | |
download | gitlab-ce-e48f54b5b23b4b865a4462151d576d2ff09d543e.tar.gz |
Merge branch 'enable-webpack-code-splitting' into 'master'
Enable webpack code splitting
Closes #32989
See merge request !12032
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/awards_handler_spec.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/spec/javascripts/awards_handler_spec.js b/spec/javascripts/awards_handler_spec.js index 3fc03324d16..8e056882108 100644 --- a/spec/javascripts/awards_handler_spec.js +++ b/spec/javascripts/awards_handler_spec.js @@ -1,7 +1,7 @@ /* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, no-unused-expressions, comma-dangle, new-parens, no-unused-vars, quotes, jasmine/no-spec-dupes, prefer-template, max-len */ import Cookies from 'js-cookie'; -import AwardsHandler from '~/awards_handler'; +import loadAwardsHandler from '~/awards_handler'; import '~/lib/utils/common_utils'; @@ -26,14 +26,13 @@ import '~/lib/utils/common_utils'; describe('AwardsHandler', function() { preloadFixtures('issues/issue_with_comment.html.raw'); - beforeEach(function() { + beforeEach(function(done) { loadFixtures('issues/issue_with_comment.html.raw'); - awardsHandler = new AwardsHandler; - spyOn(awardsHandler, 'postEmoji').and.callFake((function(_this) { - return function(button, url, emoji, cb) { - return cb(); - }; - })(this)); + loadAwardsHandler(true).then((obj) => { + awardsHandler = obj; + spyOn(awardsHandler, 'postEmoji').and.callFake((button, url, emoji, cb) => cb()); + done(); + }).catch(fail); let isEmojiMenuBuilt = false; openAndWaitForEmojiMenu = function() { |