-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update: 兼容rsuite@5 Modal * update:更新rsuite版本 * update:兼容低版本rsuite * update: test case * fix: rsuite@3 Compatibility * update: rsuite@5 * update: 测试兼容rsuite@4/@5 * bugfixed: 修复环境变量注入 Co-authored-by: sun <qiang.sun@mail.hypers.com>
- Loading branch information
Showing
7 changed files
with
356 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,27 @@ | ||
import '@testing-library/jest-dom'; | ||
|
||
if (process.env.RSUITE === '5') { | ||
jest.mock( | ||
'date-fns/_lib/toInteger/index.js', | ||
() => { | ||
return jest.requireActual('date-fns2/_lib/toInteger/index.js'); | ||
}, | ||
{ virtual: true } | ||
); | ||
|
||
jest.mock( | ||
'date-fns/_lib/cloneObject', | ||
() => { | ||
return jest.requireActual('date-fns2/_lib/cloneObject'); | ||
}, | ||
{ virtual: true } | ||
); | ||
|
||
jest.mock('rsuite', () => { | ||
return jest.requireActual('rsuite5'); | ||
}); | ||
} else { | ||
jest.mock('rsuite', () => { | ||
return jest.requireActual('rsuite4'); | ||
}); | ||
} |
Oops, something went wrong.