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
e2069f79
Commit
e2069f79
authored
Oct 04, 2021
by
Albert Salim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dependency on jest-resolver
parent
99f98755
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
.eslintrc.yml
.eslintrc.yml
+1
-0
jest_resolver.js
jest_resolver.js
+2
-6
No files found.
.eslintrc.yml
View file @
e2069f79
...
...
@@ -100,6 +100,7 @@ overrides:
-
'
scripts/**/*'
-
'
*.config.js'
-
'
*.config.*.js'
-
'
jest_resolver.js'
-
storybook/config/*.js
rules
:
'
@gitlab/require-i18n-strings'
:
off
...
...
jest_resolver.js
View file @
e2069f79
/* eslint-disable import/no-commonjs */
/* eslint-disable import/no-extraneous-dependencies */
const
Resolver
=
require
(
'
jest-resolve
'
);
const
fs
=
require
(
'
fs
'
);
// Wrap jest default resolver to detect missing frontend fixtures.
module
.
exports
=
(
request
,
options
)
=>
{
try
{
return
options
.
defaultResolver
(
request
,
options
);
}
catch
(
e
)
{
if
(
Resolver
.
tryCastModuleNotFoundError
(
e
)
&&
request
.
match
(
/tmp
\/
tests
\/
frontend
\/
fixtures/
))
{
/* eslint-disable no-console */
/* eslint-disable @gitlab/require-i18n-strings */
if
(
request
.
match
(
/tmp
\/
tests
\/
frontend
\/
fixtures/
)
&&
!
fs
.
existsSync
(
request
))
{
console
.
error
(
'
\
x1b[1m
\
x1b[41m
\
x1b[30m %s
\
x1b[0m %s
'
,
'
!
'
,
...
...
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