summaryrefslogtreecommitdiff
path: root/spec/frontend/mocks_spec.js
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-07-18 12:47:43 +0100
committerFilipa Lacerda <filipa@gitlab.com>2019-07-18 12:47:43 +0100
commitd158efa8a2012bc2d6a80f71c765aefb677fe38e (patch)
tree59923c49efd8562af815db708308f003b80fb318 /spec/frontend/mocks_spec.js
parent0f7d462b6a16ffa40aae162be7d292ce2e00246e (diff)
parent3069cb25451cf9aad4840551b7286fee1c5aebc8 (diff)
downloadgitlab-ce-10009-ee-board.tar.gz
Merge branch 'master' into 10009-ee-board10009-ee-board
* master: (34 commits) Set correct file mode for autocomplete images Ensure visibility icons in group/project listings are grey FE remove create branch call in IDE commit Add start_sha to commits API Localize updated text on projects list page Perform more redactions in Redis performance bar traces Refactor all existing usages of .act Unquarantine object storage test Go guide: be more explicit on testing frameworks + diffing test results Doc for "Move external authorization service API management to EE" Fix unordered list spacing Refactor RedisCounter and WebIdeCommitsCounter Move boards switcher partial Add tests for when deploy token usernames are not unique Fix factory default for pages_access_level Add documentation surrounding [data-qa-selector] Mockify jquery and axios packages Add docs about auto-injected Jest mocks Add rule_type to approval_project_rules typo ...
Diffstat (limited to 'spec/frontend/mocks_spec.js')
-rw-r--r--spec/frontend/mocks_spec.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/frontend/mocks_spec.js b/spec/frontend/mocks_spec.js
new file mode 100644
index 00000000000..2d2324120fd
--- /dev/null
+++ b/spec/frontend/mocks_spec.js
@@ -0,0 +1,13 @@
+import $ from 'jquery';
+import axios from '~/lib/utils/axios_utils';
+
+describe('Mock auto-injection', () => {
+ describe('mocks', () => {
+ it('~/lib/utils/axios_utils', () =>
+ expect(axios.get('http://gitlab.com')).rejects.toThrow('Unexpected unmocked request'));
+
+ it('jQuery.ajax()', () => {
+ expect($.ajax).toThrow('Unexpected unmocked');
+ });
+ });
+});