MCPcopy Create free account
hub / github.com/dachev/node-cld / runOne

Function runOne

test/runner.js:7–15  ·  view source on GitHub ↗
(expectedLangName, text, shouldBeReliable)

Source from the content-addressed store, hash-verified

5var assert = require('assert');
6
7function runOne(expectedLangName, text, shouldBeReliable) {
8 var detectionResult = cld.detect(text);
9
10 assert.equal(expectedLangName, detectionResult.name);
11
12 if (shouldBeReliable == true) {
13 assert.equal(detectionResult.reliable, true, detectionResult.name);
14 }
15}
16
17function runAll(tests) {
18 for (var i = 0; i < tests.length; i++) {

Callers 1

runAllFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected