Skip to content

Commit 536e6e9

Browse files
Added notes for clarification needs in the tests
1 parent 9caf482 commit 536e6e9

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/plots/cartesian/axis_autotype.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ var isDateTime = Lib.isDateTime;
1010
var cleanNumber = Lib.cleanNumber;
1111
var round = Math.round;
1212

13+
// Determines a type for an axis based on the contents of array.
1314
module.exports = function autoType(array, calendar, opts) {
1415
var a = array;
1516

test/jasmine/tests/axes_test.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,14 @@ describe('Test axes', function() {
338338
});
339339
});
340340

341+
/* TODO: These tests don't actually test if the numeric strings are
342+
* indeed converted or not... */
341343
describe('autotype disable/enable converting numeric strings', function() {
344+
/* TODO: The test description doesn't totally reflect what it is
345+
* testing: here the test is to determine that setting
346+
* autotypenumbers: 'strict' on the yaxis forces yaxis.type to be
347+
* 'category', that's it.
348+
*/
342349
it('should disable converting numeric strings using axis.autotypenumbers', function() {
343350
layoutIn = {
344351
xaxis: {},
@@ -381,7 +388,11 @@ describe('Test axes', function() {
381388
expect(layoutOut.yaxis.type).toBe('category');
382389
});
383390

384-
it('should autotype date having more dates with & without strict autotypenumbers', function() {
391+
/* TODO: Should not the opposite also be tested? Namely that data
392+
* having fewer dates gets forced to 'category' (that's consitent
393+
* with the previous test).
394+
*/
395+
it('should autotype data having more dates with & without strict autotypenumbers', function() {
385396
layoutIn = {
386397
xaxis: {},
387398
yaxis: { autotypenumbers: 'strict' }

test/jasmine/tests/plot_api_test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ describe('Test plot api', function() {
269269
.then(done, done.fail);
270270
});
271271

272+
// TODO: Make this test work for the case where categories are numeric
273+
// strings
272274
it('annotations, shapes and images linked to category axes should update properly on zoom/pan', function(done) {
273275
var jsLogo = 'https://images.plot.ly/language-icons/api-home/js-logo.png';
274276

0 commit comments

Comments
 (0)