Skip to content

Commit 2ceac06

Browse files
committed
Make jasmine test more specific; remove mock
1 parent c8a2607 commit 2ceac06

File tree

3 files changed

+9
-27
lines changed

3 files changed

+9
-27
lines changed
-24.4 KB
Binary file not shown.

test/image/mocks/groupby_coloring.json

-23
This file was deleted.

test/jasmine/tests/transform_groupby_test.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ describe('groupby', function() {
696696

697697
describe('expanded trace coloring', function() {
698698
it('assigns unique colors to each group', function() {
699-
var uniqueColors = {};
699+
var colors = [];
700700
var dataOut = [];
701701
var dataIn = [{
702702
y: [1, 2, 3],
@@ -715,11 +715,16 @@ describe('groupby', function() {
715715
Plots.supplyDataDefaults(dataIn, dataOut, {}, {});
716716

717717
for(var i = 0; i < dataOut.length; i++) {
718-
uniqueColors[dataOut[i].marker.color] = true;
718+
colors.push(dataOut[i].marker.color);
719719
}
720720

721-
// Confirm that five total colors exist:
722-
expect(Object.keys(uniqueColors).length).toEqual(5);
721+
expect(colors).toEqual([
722+
'#1f77b4',
723+
'#ff7f0e',
724+
'#2ca02c',
725+
'#d62728',
726+
'#9467bd'
727+
]);
723728
});
724729
});
725730
});

0 commit comments

Comments
 (0)