Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pro-layout
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
packages
pro-layout
Commits
ba87845a
Commit
ba87845a
authored
Feb 09, 2021
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: jest test script
parent
9f260651
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
.jest.js
.jest.js
+4
-3
babel.config.js
babel.config.js
+1
-0
No files found.
.jest.js
View file @
ba87845a
...
...
@@ -5,17 +5,18 @@ module.exports = {
testURL
:
'http://localhost/'
,
preset
:
'ts-jest'
,
moduleFileExtensions
:
[
'js'
,
'ts'
,
'tsx'
,
'json'
,
'vue'
],
modulePathIgnorePatterns
:
[
'/_site/'
],
modulePathIgnorePatterns
:
[
'/_site/'
,
'/examples/'
],
transform
:
{
// '^.+\\.(js|jsx|ts|tsx)$': '<rootDir>/jest/jestpreprocessor.js',
'^.+
\\
.js$'
:
'babel-jest'
,
'^.+
\\
.(ts|tsx)$'
:
'ts-jest'
,
// '^.+\\.svg$': '<rootDir>/node_modules/jest-transform-stub',
'^.+
\\
.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$'
:
'jest-transform-stub'
,
},
testRegex
:
libDir
===
'dist'
?
'demo
\\
.test
\\
.ts$'
:
'.*
\\
.test
\\
.tsx$'
,
testEnvironment
:
'jest-environment-jsdom-fifteen'
,
moduleNameMapper
:
{
'^@/(.*)$'
:
'<rootDir>/$1'
,
// '^.*ant-design/icons.*\\.js': '<rootDir>/node_modules/babel-jest',
// '^.*lodash-es.*\\.js': '<rootDir>/node_modules/babel-jest',
// '^.*ant-design-vue.*[.]?style|css|less.*$': 'jest-transform-stub',
},
...
...
@@ -27,7 +28,7 @@ module.exports = {
'/dist/'
,
// Ignore modules without es dir.
// Update: @babel/runtime should also be transformed
'<rootDir>/node_modules/(?!(lodash-es|ant-design-vue/es))'
,
'<rootDir>/node_modules/(?!(lodash-es|ant-design-vue/es
|@ant-design/icons-vue|@ant-design/icons-svg
))'
,
],
verbose
:
true
,
globals
:
{
...
...
babel.config.js
View file @
ba87845a
...
...
@@ -13,6 +13,7 @@ module.exports = {
'@babel/plugin-syntax-dynamic-import'
,
'@babel/plugin-transform-runtime'
,
'@babel/plugin-transform-modules-commonjs'
,
// 'transform-es2015-modules-commonjs',
],
},
},
...
...
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