You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
770 B
24 lines
770 B
6 years ago
|
/**
|
||
|
* @Author: lei.wang
|
||
|
* @Maintainers: lei.wang
|
||
|
* @Date: 2019-04-16
|
||
|
*/
|
||
|
describe("core-function-test", function () {
|
||
|
/**
|
||
|
* test_author_lei.wang
|
||
|
*/
|
||
|
it("createDistinctName-支持字符串数组", function () {
|
||
|
var names = ["name", "name1"];
|
||
|
expect(BI.Func.createDistinctName(names, "name")).to.equal("name2");
|
||
|
expect(BI.Func.createDistinctName(names, "name2")).to.equal("name2");
|
||
|
});
|
||
|
|
||
|
/**
|
||
|
* test_author_lei.wang
|
||
|
*/
|
||
|
it("createDistinctName-支持对象数组数组", function () {
|
||
|
var names = [{ name: "name" }, { name: "name1" }];
|
||
|
expect(BI.Func.createDistinctName(names, "name")).to.equal("name2");
|
||
|
expect(BI.Func.createDistinctName(names, "name2")).to.equal("name2");
|
||
|
});
|
||
|
});
|