var assert = require("assert");
describe('Array', function(){
describe('#indexOf()', function(){
it('should return -1 when the value is not present', function(){
assert.equal(-1, [1,2,3].indexOf(5));
assert.equal(-1, [1,2,3].indexOf(0));
})
})
});
fs = require('fs');
describe('File', function(){
describe('#readFile()', function(){
it('should read test.ls without error', function(done){
fs.readFile('test.ls', function(err){
if (err) throw err;
done();
});
})
})
})
fs = require('fs');
describe('File', function(){
describe('#readFile()', function(){
it('should read test.ls without error', function(done){
fs.readFile('test.ls', function(err){
if (err) throw err;
done();
});
})
it('should read test.js without error', function(done){
fs.readFile('test.js', function(err){
if (err) throw err;
done();
});
})
})
})
describe('Array', function(){
describe('#indexOf()', function(){
it('should return -1 when the value is not present', function(){
})
})
});
fs = require('fs');
describe('File', function(){
describe('#readFile()', function(){
it.skip('should read test.ls without error', function(done){
fs.readFile('test.ls', function(err){
if (err) throw err;
done();
});
})
it('should read test.js without error', function(done){
})
})
})
fs = require('fs');
describe('File', function(){
describe('#readFile()', function(){
it.skip('should read test.ls without error', function(done){
fs.readFile('test.as', function(err){
if (err) throw err;
done();
});
})
it('should read test.js without error', function(done){
})
})
})
require! assert require! fs can = it describe 'Array', !-> beforeEach !-> console.log 'beforeEach Array' before !-> console.log 'before Array' before !-> console.log 'before Array second time' after !-> console.log 'after Array' describe '#indexOf()', !-> can 'should return -1 when the value is not present', !-> assert.equal -1, [1,2,3].indexOf 0 can 'should return 1 when the value is not present', !-> describe 'File', !-> beforeEach !-> console.log 'beforeEach file test!' afterEach !-> console.log 'afterEach File test!' describe '#readFile()', !-> can 'should read test.ls without error', !(done)-> fs.readFile 'test.ls', !(err)-> if err throw err done! can 'should read test.js without error', !(done)-> fs.readFile 'test.js', !(err)-> if err throw err done!
suite 'Array', !-> setup !-> console.log 'setup' teardown !-> console.log 'teardown' suite '#indexOf()', !-> test 'should return -1 when not present', !-> assert.equal -1, [1,2,3].indexOf 4
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有