Skip to content

Commit f5919d6

Browse files
Make javascript tests run
1 parent d049523 commit f5919d6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/basic_test.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ const libUrls = require('../');
77
const SPEC_FILE = path.join(__dirname, '../tests.yml');
88

99
suite('basic test', function() {
10+
1011
var doc = yaml.safeLoad(fs.readFileSync(SPEC_FILE, {encoding: 'utf8'}));
11-
for (let test of doc['tests']) {
12-
for (let argSet of test['argSets']) {
12+
for (let t of doc['tests']) {
13+
for (let argSet of t['argSets']) {
1314
for (let cluster of Object.keys(doc['rootURLs'])) {
1415
for (let rootURL of doc['rootURLs'][cluster]) {
15-
assert.equal(test['expected'][cluster], libUrls.withRootUrl(rootURL)[test['function']](...argSet));
16-
assert.equal(test['expected'][cluster], libUrls[test['function']](rootURL, ...argSet));
16+
test(`${t['function']} - ${argSet}`, function() {
17+
assert.equal(t['expected'][cluster], libUrls.withRootUrl(rootURL)[t['function']](...argSet));
18+
assert.equal(t['expected'][cluster], libUrls[t['function']](rootURL, ...argSet));
19+
});
1720
}
1821
}
1922
}

0 commit comments

Comments
 (0)