Skip to content

Commit 4706675

Browse files
committed
test: update transition #5023
1 parent ae9ab9c commit 4706675

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

components/_util/transition.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,17 @@ export const getTransitionGroupProps = (transitionName: string, opt: TransitionP
5858
let Transition = T;
5959
let TransitionGroup = TG;
6060

61-
if (process.env.JUST_ANTDV_ENV === 'test') {
61+
if (process.env.NODE_ENV === 'test') {
62+
let warn = true;
6263
Transition = defineComponent({
6364
name: 'TransitionForTest',
6465
inheritAttrs: false,
6566
setup(_props, { slots, attrs }) {
6667
const instance = getCurrentInstance();
68+
if (warn) {
69+
console.warn('application runing at test env, you should build use production env');
70+
warn = false;
71+
}
6772
onUpdated(() => {
6873
const child = instance.subTree.children[0];
6974
if (child && child.dirs && child.dirs[0]) {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"scripts": {
3131
"predev": "node node_modules/esbuild/install.js",
3232
"dev": "yarn predev && yarn routes && vite serve site",
33-
"test": "cross-env NODE_ENV=test JUST_ANTDV_ENV=test jest --config .jest.js",
33+
"test": "cross-env NODE_ENV=test jest --config .jest.js",
3434
"compile": "node antd-tools/cli/run.js compile",
3535
"generator-webtypes": "tsc -p antd-tools/generator-types/tsconfig.json && node antd-tools/generator-types/index.js",
3636
"pub": "node --max_old_space_size=8192 antd-tools/cli/run.js pub",

0 commit comments

Comments
 (0)