Skip to content

Commit

Permalink
Merge pull request #493 from akmorrow13/fix-feature-tests
Browse files Browse the repository at this point in the history
Fixed async failing FeatureTrack tests
  • Loading branch information
akmorrow13 authored Aug 28, 2018
2 parents 7a57554 + 3890d46 commit e8817ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
17 changes: 3 additions & 14 deletions src/test/viz/FeatureTrack-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,9 @@ describe('FeatureTrack', function() {
var drawnObjects = dataCanvas.RecordingContext.drawnObjects;

function ready(): boolean {
if (testDiv.querySelector('canvas') != null &&
drawnObjects(testDiv, '.features').length > 0) {
// for flow to be happy. Need to check whether
// feature selector exists before checking its height
var featureSelector = testDiv.querySelector('.features');
if (featureSelector != null) {
return parseInt(featureSelector.style.height) > 0;
} else {
return false;
}
} else {
return false;
}

return testDiv.querySelector('.features canvas') !== null &&
testDiv.querySelector('.features canvas') !== undefined &&
drawnObjects(testDiv, '.features').length > 0;
}

describe('jsonFeatures', function() {
Expand Down
3 changes: 1 addition & 2 deletions src/test/viz/PileupCache-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ describe('PileupCache', function() {
done();
});

it('should compute statistics on a BAM file', function(done): any {
it('should compute statistics on a BAM file', function(): any {
this.timeout(5000);
var bam = new Bam(
new RemoteFile('/test-data/synth4.tumor.1.4930000-4950000.bam'),
Expand All @@ -243,7 +243,6 @@ describe('PileupCache', function() {
var stats = cache.getInsertStats();
expect(stats.minOutlierSize).to.be.within(1, 100);
expect(stats.maxOutlierSize).to.be.within(500, 600);
done();
});
});

Expand Down

0 comments on commit e8817ec

Please sign in to comment.