Skip to content

Commit

Permalink
Add test for valid iso-639-3 code
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 8, 2014
1 parent 8b339ad commit 3f62832
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"author": "Titus Wormer <[email protected]>",
"devDependencies": {
"eslint": "^0.9.0",
"iso-639-3": "^0.1.0",
"istanbul": "^0.3.0",
"jscs": "^1.0.0",
"markdown-table": "0.1.0",
Expand Down
4 changes: 4 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@

var franc,
assert,
iso6393,
support,
fixtures;

franc = require('..');
assert = require('assert');
iso6393 = require('iso-639-3');
support = require('../data/support');
fixtures = require('./fixtures');

Expand Down Expand Up @@ -201,6 +203,8 @@ describe('algorithm', function () {
result.forEach(function (tuple) {
assert(tuple[1] <= 1);
assert(tuple[1] >= 0);

assert(iso6393.has(tuple[0]));
});

result = result[0][0];
Expand Down

0 comments on commit 3f62832

Please sign in to comment.