forked from fanruan/fineui
Browse Source
* commit '57ea70af2735db710bd9465ea863c621448420bd': BI-43211 feat:createDistinctName支持字符串数组master
windy
6 years ago
11 changed files with 34 additions and 10 deletions
@ -0,0 +1,24 @@
|
||||
/** |
||||
* @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"); |
||||
}); |
||||
}); |
Loading…
Reference in new issue