Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
Merge cfed432 into d0513e6
Browse files Browse the repository at this point in the history
  • Loading branch information
SerayaEryn committed Jan 17, 2019
2 parents d0513e6 + cfed432 commit 7952c9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/Translator.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = class Translator {
this.numbers = {}
this.sources = []
this.options = getOptions(options)
this.interval = null
}

use (source) {
Expand Down
4 changes: 2 additions & 2 deletions test/translation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ test('should handle reload', (t) => {
})
const _reload = translation._reload.bind(translation)
translation._reload = () => {
clearInterval(translation.interval)
t.pass()
return _reload()
}
Expand Down Expand Up @@ -291,7 +292,7 @@ test('should use source', (t) => {

test('should use handler on reload()', (t) => {
t.plan(1)

const translations = {
test: {
title: '__count__ singular',
Expand Down Expand Up @@ -355,4 +356,3 @@ test('should use handler on reload() and handle error', (t) => {
})
})
})

0 comments on commit 7952c9e

Please sign in to comment.