Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
dc8b8c72
Commit
dc8b8c72
authored
Sep 01, 2014
by
worry127722
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改测试框架
parent
de30dda3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
13 deletions
+25
-13
command.js
spec/core/command.js
+3
-5
utils.js
spec/core/utils.js
+21
-8
run.js
spec/tools/js/run.js
+1
-0
No files found.
spec/core/command.js
View file @
dc8b8c72
...
@@ -9,16 +9,14 @@ describe("command", function () {
...
@@ -9,16 +9,14 @@ describe("command", function () {
beforeEach
(
function
(){
beforeEach
(
function
(){
document
.
body
.
appendChild
(
kityMinderDiv
);
document
.
body
.
appendChild
(
kityMinderDiv
);
km
=
KM
.
getKityMinder
(
'kityminder'
);
km
=
KM
.
getKityMinder
(
'kityminder'
);
obj
=
document
.
getElementById
(
'kityminder'
);
obj
=
document
.
getElementById
(
'kityminder'
);
kityMinderDiv
.
style
.
display
=
"block"
;
});
});
afterEach
(
function
(){
afterEach
(
function
(){
obj
=
null
;
// obj = null;
kityMinderDiv
.
style
.
display
=
"none"
;
// document.body.removeChild(kityMinderDiv);
document
.
body
.
removeChild
(
kityMinderDiv
);
});
});
...
...
spec/core/utils.js
View file @
dc8b8c72
...
@@ -10,24 +10,34 @@ describe("utils", function () {
...
@@ -10,24 +10,34 @@ describe("utils", function () {
beforeEach
(
function
(){
beforeEach
(
function
(){
if
(
flag
){
if
(
flag
){
document
.
body
.
appendChild
(
kityMinderDiv
);
document
.
getElementById
(
'HTMLReporter'
)
.
appendChild
(
kityMinderDiv
);
km
=
KM
.
getKityMinder
(
'kityminder'
);
km
=
KM
.
getKityMinder
(
'kityminder'
);
obj
=
document
.
getElementById
(
'kityminder'
);
obj
=
document
.
getElementById
(
'kityminder'
);
flag
=
false
;
flag
=
false
;
}
}
});
});
afterEach
(
function
(){
afterEach
(
function
(){
// obj = null;
// km = null;
// KM = null;
// kityMinderDiv.style.display = "none";
// document.body.removeChild(kityMinderDiv);
// document.body.removeChild(kityMinderDiv);
console
.
log
(
document
.
body
);
// console.log(km
);
});
});
// 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;
// }
...
@@ -39,6 +49,9 @@ describe("utils", function () {
...
@@ -39,6 +49,9 @@ describe("utils", function () {
var
obj2
=
utils
.
clonePlainObject
(
obj1
);
var
obj2
=
utils
.
clonePlainObject
(
obj1
);
it
(
'相等'
,
function
(){
it
(
'相等'
,
function
(){
// console.log(km);
console
.
log
(
document
.
getElementById
(
'kityminder'
));
expect
(
utils
.
compareObject
(
obj1
,
obj2
)).
toBeTruthy
();
expect
(
utils
.
compareObject
(
obj1
,
obj2
)).
toBeTruthy
();
});
});
it
(
'长度不同'
,
function
(){
it
(
'长度不同'
,
function
(){
...
...
spec/tools/js/run.js
View file @
dc8b8c72
...
@@ -132,6 +132,7 @@ function run(kiss,runnext) {
...
@@ -132,6 +132,7 @@ function run(kiss,runnext) {
var
iframe
=
document
.
createElement
(
'iframe'
);
var
iframe
=
document
.
createElement
(
'iframe'
);
iframe
.
id
=
fid
;
iframe
.
id
=
fid
;
iframe
.
src
=
url
;
iframe
.
src
=
url
;
iframe
.
style
.
minHeight
=
"1500px"
;
addClass
(
iframe
,
"runningframe"
);
addClass
(
iframe
,
"runningframe"
);
runningarea
.
appendChild
(
iframe
);
runningarea
.
appendChild
(
iframe
);
wb
.
kissstart
=
new
Date
().
getTime
();
wb
.
kissstart
=
new
Date
().
getTime
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment