Skip to content

Commit

Permalink
Make Content.isTimeout private
Browse files Browse the repository at this point in the history
  • Loading branch information
ainzzorl committed Mar 29, 2017
1 parent aea4fa4 commit ef041a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions spec/contentSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,8 @@ describe('content', function() {
doTest('disabled');
});

it('highlights only the first word if it times out immediately', () => {
content.isTimeout = function() {
return true;
};
it('does not highlight anything if it times out', () => {
settings.timeout = 0;
doTest('timeout');
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/lib/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Content {
);
}

isTimeout(): boolean {
private isTimeout(): boolean {
let now = performance.now();
let seconds = (now - this.startTime) / 1000;
return seconds > this.settings.timeout;
Expand Down

0 comments on commit ef041a8

Please sign in to comment.