Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

[gulpfile.js]
indent_style = space
indent_size = 2

[*.yml]
indent_style = space
indent_size = 2
7 changes: 6 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@ function unittestTask(done) {
args: {
coverage: !!argv.coverage
}
}, done).start();
},
// https://github.com/karma-runner/gulp-karma/issues/18
function(error) {
error = error ? new Error('Karma returned with the error code: ' + error) : undefined;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that works, but to be sure, can you push a change that makes a test to fail. I'm curious to see how the Travis build behaves and how errors are reported.

done(error);
}).start();
}

function librarySizeTask() {
Expand Down
4 changes: 4 additions & 0 deletions test/jasmine.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ var utils = require('./jasmine.utils');
return new Context();
}

// force ratio=1 for tests on high-res/retina devices
// fixes https://github.com/chartjs/Chart.js/issues/4515
window.devicePixelRatio = 1;

window.acquireChart = acquireChart;
window.releaseChart = releaseChart;
window.waitForResize = utils.waitForResize;
Expand Down
4 changes: 2 additions & 2 deletions test/specs/platform.dom.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,8 @@ describe('Platform.dom', function() {
expect(notifiedEvent.type).toBe(evt.type);

// Relative Position
expect(notifiedEvent.x).toBe(chart.width / 2);
expect(notifiedEvent.y).toBe(chart.height / 2);
expect(notifiedEvent.x).toBeCloseToPixel(chart.width / 2);
expect(notifiedEvent.y).toBeCloseToPixel(chart.height / 2);
});
});
});