1 Star 0 Fork 0

ai2ming / learn-es6-with-mocha

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

使用Mocha单元测试,学习ES6的新特性

安装方法

git clone git@github.com:ai2ming/learn-es6-with-mocha
cd learn-es6-with-mocha
npm install

运行所有的测试用例

npm test

测试用例目录

  1. 01-let-const.test.js
    学习定义变量的新方法,let和const
  2. 02-template-string.test.js
    学习``表示的字符串,具有变量插值、多行文本的新特性
  3. 03-arrow-function.test.js
    学习箭头函数,比匿名函数更方便,且this指向明确
  4. 04-object-literal.test.js
    在es6中更方便的定义对象
  5. 05-destructuring.test.js
    如何更方便的数据、对象、字符串中提取部分值作为变量
  6. 06-rest-operator.test.js
    使用...操作符,表示解构中剩余的部分,或函数调用的剩余参数
  7. 07-spread-operator.test.js
    和解构相反,学习如何将数组、对象打散,合并到新的数组或对象中
  8. 08-javascript-class.test.js
    学习es6中的class用法,包括构造构造函数,get和set,静态属性和方法,以及类继承的注意事项

其他学习ES的参考资料

ECMAScript 6 入门,阮一峰的电子书
ES6 Katas, 在线练习有一定的难度,js自信的可以大胆尝试

MIT License Copyright (c) 2018 ai2ming Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

使用Mocha单元测试,学习ES6的新特性 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/xingaiming/learn-es6-with-mocha.git
git@gitee.com:xingaiming/learn-es6-with-mocha.git
xingaiming
learn-es6-with-mocha
learn-es6-with-mocha
master

搜索帮助