Commit 37352939 authored by worry127722's avatar worry127722

修改测试框架

parent a11f189b
describe("minder.command", function () {
//初始化kityminder
var kityMinderDiv = document.createElement("div");
kityMinderDiv.id = "kityminder";
kityMinderDiv.style.height = "500px";
kityMinderDiv.style.position = "relative";
var obj;
var km;
beforeEach(function(){
document.body.appendChild(kityMinderDiv);
km = KM.getMinder('kityminder', window.KITYMINDER_CONFIG);
obj = document.getElementById('kityminder');
});
afterEach(function(){
// obj = null;
// document.body.removeChild(kityMinderDiv);
});
//kityminder初始化end
it('',function(){
})
......
describe("node", function () {
//初始化kityminder
var kityMinderDiv = document.createElement("div");
kityMinderDiv.id = "kityminder";
kityMinderDiv.style.height = "500px";
kityMinderDiv.style.position = "relative";
var obj;
var km;
beforeEach(function(){
document.body.appendChild(kityMinderDiv);
km = KM.getMinder('kityminder', window.KITYMINDER_CONFIG);
obj = document.getElementById('kityminder');
});
afterEach(function(){
// obj = null;
// document.body.removeChild(kityMinderDiv);
});
//kityminder初始化end
var root = new KM.MinderNode('root');
var first = new KM.MinderNode('first');
......
describe("utils", function () {
//初始化kityminder
var kityMinderDiv = document.createElement("div");
kityMinderDiv.id = "kityminder";
kityMinderDiv.style.height = "500px";
kityMinderDiv.style.position = "relative";
var obj;
var km;
var flag = true;
beforeEach(function(){
if(flag){
document.getElementById('HTMLReporter').appendChild(kityMinderDiv);
km = KM.getKityMinder('kityminder');
document.body.appendChild(kityMinderDiv);
km = KM.getMinder('kityminder', window.KITYMINDER_CONFIG);
obj = document.getElementById('kityminder');
flag = false;
}
});
afterEach(function(){
// obj = null;
// document.body.removeChild(kityMinderDiv);
// console.log(km);
});
//kityminder初始化end
// var kityMinderDiv = document.createElement("div");
// kityMinderDiv.id = "kityminder";
// kityMinderDiv.style.height = "500px";
// kityMinderDiv.style.position = "relative";
// var obj;
// var km;
// var flag = true;
//
// if(flag){
// document.body.appendChild(kityMinderDiv);
// km = KM.getKityMinder('kityminder');
// obj = document.getElementById('kityminder');
// flag = false;
// }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment