??Nodejs?????д????
???????????? ???????[ 2016/6/3 16:15:03 ] ????????Nodejs ???????
??????д????????????????
????BDD??TDD????The Difference Between TDD and BDD
???????????
????mocha
????Mocha?????????node.js????????????????????Javascript?????????????????????????????> ?????Mocha??????????????????????????????????δ??????????????????????????檔
????????????
????should.js (BDD)
????chai?????assert??should??expect??
????supertest (?????????????????????????????)
????????????mocha?????
????var assert = require('chai').assert;
????var expect = require('chai').expect;
????var should=require('chai').should();
????describe('Test'?? function(){
????before(function() {
????// runs before all tests in this block
????});
????after(function(){
????// runs after all tests in this block
????});
????beforeEach(function(){
????// runs before each test in this block
????});
????afterEach(function(){
????// runs after each test in this block
????});
????describe('Array'?? function() {
????describe('#indexOf()'?? function() {
????it('should return -1 when the value is not present'?? function() {
????[1??2??3].indexOf(5).should.equal(-1);
????[1??2??3].indexOf(0).should.equal(-1);
????});
????});
????});
????})
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11