10.0.0 • Published 3 months ago
yycf-algorithm v10.0.0
介绍
你好,我是徐晓东,笔名燕云长风。大漠穷秋于 2019-03-16 21:22 赠此笔名。
寓意:结合李白著名的边塞诗《关山月》取【燕云长风】—— 长风几万里,吹度玉门关。
这是一系列的算法题,如下:
下载
git clone https://github.com/yanyunchangfeng/algorithm.git
安装
npm install yycf-algorithm
使用
import {bubbleSort,insertSort,quickSort,unique,deepClone,isPrime,getMonthData,genColor,copyProperities,mix} from 'yycf-algorithm';
bubbleSort();
quickSort();
insertSort();
unique();
deepClone();
isPrime();
getMonthData();
color.genColor();
multiInherit.copyProperties();
multiInherit.mix();
ranNum();
Jest Unit 测试
安装
npm install --save-dev jest typescript ts-jest @types/jest or yarn add --dev jest typescript ts-jest @types/jest
创建测试ts类型的配置文件 jest config file
npx ts-jest config:init or yarn ts-jest config:init
具体配置参数文档 请参照官网:
运行unit测试
npm t or yarn test
cypress e2e 测试
安装
npm install cypress --save-dev or yarn add cypress --dev
打开cypress 测试
npx cypress open or yarn run cypress open
添加 npm script in package.json
{
"scripts": {
"cypress:open": "cypress open"
}
}
typescript文件测试,需在cypress 目录文件夹下创建tsconfig.json
{
"compilerOptions": {
"strict": true,
"baseUrl": "../node_modules",
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress"]
},
"include": [
"**/*.ts"
]
}
创建测试文件需要在cypress/integration 文件夹下创建
touch {your_project}/cypress/integration/sample_spec.(j|t)s
运行e2e测试,选择指定文件进行测试
npm run cypress:open
具体配置参数文档 请参照官网:
我的个人博客
我参与的系列项目
- NiceFish:美人鱼,这是一个微型Blog系统,前端基于Angular7.0 + PrimeNG7.1.0。(GVIP 码云最有价值的开源项目 3207 ☆)
- NiceFish-React:这是React版的实现,和 NiceFish Angular 版本保持风格一致。采用React Hooks 16.8.3 版本,使用TypeScript、Ant Design组件库以及Bootstrap v4.2.1 开发。 (7 ☆)
- OpenWMS-Frontend:OpenWMS项目前端基于 Angular 7.0 + PrimeNG 7.1.0。 (已推荐 201 ☆)
nicefish-spring-cloud:这是NiceFish的服务端代码,基于SpringCloud。已经完成了一些基本的功能,如 SpringSecurity+OAuth2+JWT 实现SSO,文章、用户、评论等的分页查询等。如果你需要与这个后端代码进行对接,请检出本项目的 for-spring-cloud 分支。 (已推荐 118 ☆)
我的社交主页
- 燕云长风知乎
- 燕云长风知乎专栏
- 燕云长风github
- 燕云长风gitee
- 燕云长风twitter
- 燕云长风medium
- 燕云长风facebook
- 燕云长风stackoverflow
- 燕云长风npm
- 燕云长风linkedin
- 燕云长风youtube
开源许可证
MIT