Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8fdd6221
Commit
8fdd6221
authored
Jan 15, 2020
by
samdbeckham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds the alias for jest tests
- Adds an alias to the jest config - Adds an alias to webpack (just incase)
parent
eee7f704
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
config/webpack.config.js
config/webpack.config.js
+2
-0
ee/spec/frontend/monitoring/panel_type_spec.js
ee/spec/frontend/monitoring/panel_type_spec.js
+1
-1
jest.config.js
jest.config.js
+2
-0
No files found.
config/webpack.config.js
View file @
8fdd6221
...
...
@@ -92,6 +92,7 @@ const alias = {
vendor
:
path
.
join
(
ROOT_PATH
,
'
vendor/assets/javascripts
'
),
vue
$
:
'
vue/dist/vue.esm.js
'
,
spec
:
path
.
join
(
ROOT_PATH
,
'
spec/javascripts
'
),
jest
:
path
.
join
(
ROOT_PATH
,
'
spec/frontend
'
),
// the following resolves files which are different between CE and EE
ee_else_ce
:
path
.
join
(
ROOT_PATH
,
'
app/assets/javascripts
'
),
...
...
@@ -111,6 +112,7 @@ if (IS_EE) {
ee_icons
:
path
.
join
(
ROOT_PATH
,
'
ee/app/views/shared/icons
'
),
ee_images
:
path
.
join
(
ROOT_PATH
,
'
ee/app/assets/images
'
),
ee_spec
:
path
.
join
(
ROOT_PATH
,
'
ee/spec/javascripts
'
),
ee_jest
:
path
.
join
(
ROOT_PATH
,
'
ee/spec/frontend
'
),
ee_else_ce
:
path
.
join
(
ROOT_PATH
,
'
ee/app/assets/javascripts
'
),
});
}
...
...
ee/spec/frontend/monitoring/panel_type_spec.js
View file @
8fdd6221
...
...
@@ -6,7 +6,7 @@ import PanelType from 'ee/monitoring/components/panel_type.vue';
import
AlertWidget
from
'
ee/monitoring/components/alert_widget.vue
'
;
import
{
createStore
}
from
'
~/monitoring/stores
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
graphDataPrometheusQueryRange
}
from
'
../../../../spec/frontend
/monitoring/mock_data
'
;
import
{
graphDataPrometheusQueryRange
}
from
'
jest
/monitoring/mock_data
'
;
global
.
URL
.
createObjectURL
=
jest
.
fn
();
...
...
jest.config.js
View file @
8fdd6221
...
...
@@ -38,6 +38,7 @@ const moduleNameMapper = {
'
\\
.(jpg|jpeg|png|svg)$
'
:
'
<rootDir>/spec/frontend/__mocks__/file_mock.js
'
,
'
emojis(/.*).json
'
:
'
<rootDir>/fixtures/emojis$1.json
'
,
'
^spec/test_constants$
'
:
'
<rootDir>/spec/frontend/helpers/test_constants
'
,
'
^jest/(.*)$
'
:
'
<rootDir>/spec/frontend/$1
'
,
};
const
collectCoverageFrom
=
[
'
<rootDir>/app/assets/javascripts/**/*.{js,vue}
'
];
...
...
@@ -48,6 +49,7 @@ if (IS_EE) {
'
^ee(/.*)$
'
:
rootDirEE
,
'
^ee_component(/.*)$
'
:
rootDirEE
,
'
^ee_else_ce(/.*)$
'
:
rootDirEE
,
'
^ee_jest/(.*)$
'
:
'
<rootDir>/ee/spec/frontend/$1
'
,
});
collectCoverageFrom
.
push
(
rootDirEE
.
replace
(
'
$1
'
,
'
/**/*.{js,vue}
'
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment