Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
added the test case for #3
Browse files Browse the repository at this point in the history
  • Loading branch information
dannycoates committed Jun 10, 2014
1 parent 95ca161 commit 4e3d910
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/local/translator_tests.js
@@ -0,0 +1,19 @@
var test = require('tap').test

require('../../translator')(['en_US','pt_br', 'DE', 'ES_AR', 'ES_cl'])
.done(
function (translator) {
test(
'translator works with upper and lowercase languages',
function (t) {
var x = translator('PT-br,DE')
t.equal(x.language, 'pt-BR')
x = translator('bu-ll,es-ar')
t.equal(x.language, 'es-AR')
x = translator('es-CL')
t.equal(x.language, 'es-CL')
t.end()
}
)
}
)

0 comments on commit 4e3d910

Please sign in to comment.