-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test): support test mock RenderClient (#9556)
* feat(test): support test mock RenderClient * reset * reset errorLog * reset * reset * reset * fix * fix * fix * 减少更新 * 更好的代码写法 * 更好的代码 * 更好的代码 * 支持 g2的测试 * 默认转化所有的 es * 默认转化所有的 es * remove unuse code * add docs * remove unuse code * remove unuse code * rm act * fix(plugin-layout): copy routes to children * fix test * fix test * remove routest * fix ci error * fix * fix test * fix(plugin-layout): do not change default list * fix(plugin-layout): do not change default list * update * up jest version * update * fix: remove dev proxy * alway use mock data * chore: remove unuse code * update * update * merge * merge master * merge master
- Loading branch information
1 parent
7f2230c
commit c160f3c
Showing
24 changed files
with
2,137 additions
and
927 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
printWidth: 80, | ||
singleQuote: true, | ||
trailingComma: "all", | ||
proseWrap: "never", | ||
overrides: [{ files: ".prettierrc", options: { parser: "json" } }], | ||
plugins: [ | ||
require.resolve("prettier-plugin-packagejson"), | ||
require.resolve("./scripts/prettier-plugin"), | ||
], | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { configUmiAlias, createConfig } from '@umijs/max/test'; | ||
|
||
export default async () => { | ||
const config = await configUmiAlias({ | ||
...createConfig({ | ||
target: 'browser', | ||
}), | ||
}); | ||
return { | ||
...config, | ||
testEnvironmentOptions: { | ||
...(config?.testEnvironmentOptions || {}), | ||
url: 'http://localhost:8000', | ||
}, | ||
setupFiles: [...(config.setupFiles || []), './tests/setupTests.jsx'], | ||
globals: { | ||
...config.globals, | ||
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: false, | ||
localStorage: null, | ||
}, | ||
}; | ||
}; |
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
Oops, something went wrong.