admin 管理员组文章数量: 1184232
2024年3月8日发(作者:formation的形容词形式是什么)
10 it('true',function (done) {11 ;12 'true'.;13 done();14 });15 //content compare,not reference16 it('eql', function () {17 ({ foo: 'bar',num:1 }).({ foo: 'bar',num:1});18 //[1, 2, 3].({ '0': 1, '1': 2, '2': 3 });19
20 });21 //to be exactly,22 it('equal',function () {23 (4).(4);24 'test'.('test');25 [1,2,3].y([1,2,3]);26 });27 //>= or <=28 it('within', function () {29 (5).(5, 10).(5, 5);30 (5).(0);31 });32 //.Infinity33 it('infinity', function () {34 (1/0).ty;35 });36 //instanceof37 it('instanceof', function () {38 let ball=new Ball(11,"red");39 ceOf(Ball);40 [].ceof(Array);41 });42
43 it('properties',function () {44 let ball=new Ball(11,"red");45
46 ties('color');47 ties({size:11,color:"red"});48 });49 it('empty', function () {50 [].;51 ''.;52 ({}).;53 (function() {54 ;55 })();56 });57 it('containEql', function () {58 'hello boy'.nEql('boy');59 [1,2,3].nEql(3);60 [[1],[2],[3]].nEql([3]);61 [[1],[2],[3, 4]].nEql([3]);62 });63 //regex64 it('regex or function', function () {65 ['a', 'b', 'c'].(/[a-z]/);66 (5).(function(n) { return n > 0; });67 (5).(function(n) { return n < 0; });68 });69 it('match each', function () {70 [10, 11, 12].ach(function(it) { return it >= 10; });71 });72
73 it('exception', function () {74 (function(){
版权声明:本文标题:nodejs单元测试 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1709848925a548045.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论