补充测试+Git演示

更改后的main

/**
 * Created by lenovo on 2017/5/18.
 */
var test=function(){
};

test.prototype.sort=function(words) {
    var res = [];
    var p;
    var s=words;
    var ary = s.split(' ');
    ary.sort();
    if(words == '')
    {
        return "";
    }
    else
    {
    for(var i = 0;i");
    }
    }
}

module.exports = test;

测试代码

/**
 * Created by lenovo on 2017/5/18.
 */
var test = require("../lib/main");
describe("FrequencyN", function () {

     it("should return equal", function () {
            var result = new test();
         //noinspection JSUnresolvedFunction
         expect(result.sort("")).toEqual("");
        });
     it("should return one word one number", function () {
            var result = new test();
         //noinspection JSUnresolvedFunction
         expect(result.sort("he")).toEqual("he 1");
        });
     it("should return one word one number", function () {
            var result = new test();
         //noinspection JSUnresolvedFunction
         expect(result.sort("he is")).toEqual("he 1\r\nis 1");
        });
     it("should return one word one number", function () {
            var result = new test();
         //noinspection JSUnresolvedFunction
         expect(result.sort("he is is")).toEqual("is 2\r\nhe 1");
        })
     it("should return one word one number", function () {
            var result = new test();
         //noinspection JSUnresolvedFunction
         expect(result.sort("it was the age of wisdom it was the age of foolishness it is")).toEqual(
             "it 3\r\nwas 2\r\nthe 2\r\nage 2\r\nof 2\r\nwisdom 1\r\nfoolishness 1\r\nis 1");
        });

    });

Git练习

![7SVLED@8Z}UD]YRVRHB0P(O.png](http://upload-images.jianshu.io/upload_images/5439747-e0b7eda6f4c6911e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![VK]@ZU8ZH03}4N8}]1~JFAH.png](http://upload-images.jianshu.io/upload_images/5439747-589aed8fc04dd1a1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

补充测试+Git演示_第1张图片
ZRBV0GY4T3U$Q4{5(RN13YI.png

补充测试+Git演示_第2张图片
O7E~09EKR7GX86~~E%C%V}N.png

![LEJ66P6]LB@Y%RZPCTZ5`(Q.png]( http://upload-images.jianshu.io/upload_images/5439747-c0d68681ba6882d2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
补充测试+Git演示_第3张图片
JG0DJ%WJAL@9V)ZSLV42VR7.png

Git上传到远程仓库

![)BY]4OB(5BGSYTH8Z1_{1}2.png](http://upload-images.jianshu.io/upload_images/5439747-ae687e82b1a2c0fe.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

补充测试+Git演示_第4张图片
()GZ~_0%G@}$CKPUND9(TAS.png

补充测试+Git演示_第5张图片
{Y24T{BVU[YEH_QDBKC~QMO.png](http://upload-images.jianshu.io/upload_images/5439747-e976a6aee96665a4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) ![]G(BQ{BDZ~8TX%76%R0WX97.png

你可能感兴趣的:(补充测试+Git演示)