Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
c3-closed
Project
Project
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Evgeny
c3-closed
Commits
c6e719ac
Commit
c6e719ac
authored
Feb 26, 2015
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec
parent
1b4dd571
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
14 deletions
+31
-14
c3-helper.js
spec/c3-helper.js
+1
-0
data-spec.js
spec/data-spec.js
+30
-14
No files found.
spec/c3-helper.js
View file @
c6e719ac
...
...
@@ -34,6 +34,7 @@ function initChart(chart, args, done) {
window
.
d3
=
chart
.
internal
.
d3
;
window
.
d3
.
select
(
'.jasmine_html-reporter'
)
.
style
(
'position'
,
'absolute'
)
.
style
(
'width'
,
'640px'
)
.
style
(
'right'
,
0
);
}
...
...
spec/data-spec.js
View file @
c6e719ac
describe
(
'c3 chart data'
,
function
()
{
'use strict'
;
var
chart
;
var
args
=
{
data
:
{
columns
:
[
[
'data1'
,
30
,
200
,
100
,
400
,
150
,
250
],
[
'data2'
,
50
,
20
,
10
,
40
,
15
,
25
],
[
'data3'
,
150
,
120
,
110
,
140
,
115
,
125
]
],
order
:
function
()
{
return
0
;
}
}
};
var
chart
,
args
;
beforeEach
(
function
(
done
)
{
chart
=
window
.
initChart
(
chart
,
args
,
done
);
});
describe
(
'function in data.order'
,
function
()
{
it
(
'should update args'
,
function
()
{
args
=
{
data
:
{
columns
:
[
[
'data1'
,
30
,
200
,
100
,
400
,
150
,
250
],
[
'data2'
,
50
,
20
,
10
,
40
,
15
,
25
],
[
'data3'
,
150
,
120
,
110
,
140
,
115
,
125
]
],
order
:
function
()
{
return
0
;
}
}
};
expect
(
true
).
toBeTruthy
();
});
it
(
'should return false in isOrderAsc and isOrderDesc functions'
,
function
()
{
expect
(
chart
.
internal
.
isOrderAsc
()
||
chart
.
internal
.
isOrderDesc
()).
toBe
(
false
);
});
...
...
@@ -28,6 +31,19 @@ describe('c3 chart data', function () {
describe
(
'data.xs'
,
function
()
{
it
(
'should update args'
,
function
()
{
args
=
{
data
:
{
columns
:
[
[
'data1'
,
30
,
200
,
100
,
400
,
150
,
250
],
[
'data2'
,
50
,
20
,
10
,
40
,
15
,
25
],
[
'data3'
,
150
,
120
,
110
,
140
,
115
,
125
]
],
}
};
expect
(
true
).
toBeTruthy
();
});
describe
(
'normal x'
,
function
()
{
it
(
'should have correct number of xs for each'
,
function
()
{
...
...
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