Skip to content

Commit

Permalink
update tj github repos
Browse files Browse the repository at this point in the history
  • Loading branch information
alsotang committed Oct 28, 2014
1 parent 03a27c9 commit e1842aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lesson6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test/main.test.js: 对 main 函数进行测试,并使行覆盖率和分支覆
## 知识点

1. 学习使用测试框架 mocha : http://mochajs.org/
2. 学习使用断言库 should : https://github.com/visionmedia/should.js/
2. 学习使用断言库 should : https://github.com/tj/should.js
3. 学习使用测试率覆盖工具 istanbul : https://github.com/gotwarlost/istanbul
4. 简单 Makefile 的编写 : http://blog.csdn.net/haoel/article/details/2886

Expand Down Expand Up @@ -108,7 +108,7 @@ https://github.com/cnodejs/nodeclub/blob/master/test/controllers/topic.test.js

should 在 js 的 Object “基类”上注入了一个 `#should` 属性,这个属性中,又有着许许多多的属性可以被访问。

比如测试一个数是不是大于3,则是 `(5).should.above(3)`;测试一个字符串是否有着特定前缀:`'foobar'.should.startWith('foo');`。should.js API 在:https://github.com/visionmedia/should.js/
比如测试一个数是不是大于3,则是 `(5).should.above(3)`;测试一个字符串是否有着特定前缀:`'foobar'.should.startWith('foo');`。should.js API 在:https://github.com/tj/should.js

should.js 如果现在还是 version 3 的话,我倒是推荐大家去看看它的 API 和 源码;现在 should 是 version 4 了,API 丑得很,但为了不掉队,我还是一直用着它。我觉得 expect 麻烦,所以不用 expect,对了,expect 也是一个断言库:https://github.com/LearnBoost/expect.js/

Expand Down
2 changes: 1 addition & 1 deletion lesson7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ vendor/tests.js 编写针对前端脚本的测试用例

## 知识点

1. 学习使用测试框架 mocha 进行前端测试 : http://visionmedia.github.io/mocha/
1. 学习使用测试框架 mocha 进行前端测试 : http://mochajs.org/
2. 了解全栈的断言库 chai: http://chaijs.com/
3. 了解 headless 浏览器 phantomjs: http://phantomjs.org/

Expand Down
6 changes: 3 additions & 3 deletions lesson8/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test/main.test.js: 对 app 的接口进行测试,覆盖以上所有情况。

## 知识点

1. 学习 supertest 的使用 (https://github.com/visionmedia/supertest )
1. 学习 supertest 的使用 (https://github.com/tj/supertest )
2. 复习 mocha,should 的使用

## 课程内容
Expand All @@ -29,7 +29,7 @@ OK,基础知识前面都讲得很多了,这节课我不会事无巨细地写

噢,对了,说到 fibonacci,Node 中文圈的大神 @苏千(https://github.com/fengmk2 ) 写过一个页面,对各种语言的 fibonacci 效率进行了测试:http://fengmk2.cnpmjs.org/blog/2011/fibonacci/nodejs-python-php-ruby-lua.html 。其中,Node 的表现不知道比 Python 和 Ruby 高到哪里去了,与 CPU 谈笑风生。怀疑 js 的人啊,都 too simple,sometimes naive。

先来介绍一下 supertest。supertest 是 superagent 的孪生库。他的作者叫 tj,这是个在 Node.js 的历史上会永远被记住的名字,因为他一个人撑起了 npm 的半边天。别误会成他是 npm 的开发者,他的贡献是在 Node.js 的方方面面都贡献了非常高质量和口碑的库,比如 mocha 是他的,superagent 是他的,express 是他的,should 也是他的,还有其他很多很多,比如 koa,都是他的。如果你更详细点了解一些 Node 圈内的八卦,一定也会像我一样对 tj 佩服得五体投地。他的 github 首页是:https://github.com/visionmedia
先来介绍一下 supertest。supertest 是 superagent 的孪生库。他的作者叫 tj,这是个在 Node.js 的历史上会永远被记住的名字,因为他一个人撑起了 npm 的半边天。别误会成他是 npm 的开发者,他的贡献是在 Node.js 的方方面面都贡献了非常高质量和口碑的库,比如 mocha 是他的,superagent 是他的,express 是他的,should 也是他的,还有其他很多很多,比如 koa,都是他的。如果你更详细点了解一些 Node 圈内的八卦,一定也会像我一样对 tj 佩服得五体投地。他的 github 首页是:https://github.com/tj

假使你作为一个有志之士,想要以他为榜样,跟随他前进的步伐,那么我指条明路给你,不收费的:http://tour.golang.org/

Expand Down Expand Up @@ -247,7 +247,7 @@ describe('test/app.test.js', function () {
.end(...)
```

这里有个相关讨论:https://github.com/visionmedia/supertest/issues/46
这里有个相关讨论:https://github.com/tj/supertest/issues/46

## 拓展学习

Expand Down

0 comments on commit e1842aa

Please sign in to comment.