Skip to content

Commit e7de782

Browse files
authored
tests organization
1 parent aade20a commit e7de782

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

test/jasmine/tests/fx_test.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -235,36 +235,37 @@ describe('Fx defaults', function() {
235235
});
236236
});
237237

238-
it('should coerce hoversort only for unified hovermode', function() {
238+
it('should coerce hoversort for x unified hovermode', function() {
239239
var out = _supply([{type: 'bar', y: [1, 2, 3]}], {
240240
hovermode: 'x unified',
241241
hoversort: 'value descending'
242242
});
243243
expect(out.layout.hoversort).toBe('value descending');
244244
});
245245

246-
it('should not coerce hoversort for non-unified hovermode', function() {
246+
it('should coerce hoversort for y unified hovermode', function() {
247247
var out = _supply([{type: 'bar', y: [1, 2, 3]}], {
248-
hovermode: 'closest',
249-
hoversort: 'value descending'
248+
hovermode: 'y unified',
249+
hoversort: 'value ascending'
250250
});
251-
expect(out.layout.hoversort).toBeUndefined();
251+
expect(out.layout.hoversort).toBe('value ascending');
252252
});
253253

254-
it('should default hoversort to trace', function() {
254+
it('should default hoversort to trace in unified hovermode', function() {
255255
var out = _supply([{type: 'bar', y: [1, 2, 3]}], {
256256
hovermode: 'x unified'
257257
});
258258
expect(out.layout.hoversort).toBe('trace');
259-
});
259+
});
260260

261-
it('should coerce hoversort for y unified hovermode', function() {
261+
it('should not coerce hoversort for non-unified hovermode', function() {
262262
var out = _supply([{type: 'bar', y: [1, 2, 3]}], {
263-
hovermode: 'y unified',
264-
hoversort: 'value ascending'
263+
hovermode: 'closest',
264+
hoversort: 'value descending'
265265
});
266-
expect(out.layout.hoversort).toBe('value ascending');
266+
expect(out.layout.hoversort).toBeUndefined();
267267
});
268+
268269
});
269270

270271
describe('relayout', function() {

0 commit comments

Comments
 (0)