Browse Source

Include delimiter to guess tests on custom tests

pull/628/head
Sergi Almacellas Abellana 6 years ago
parent
commit
0e7f50be0a
  1. 27
      tests/test-cases.js

27
tests/test-cases.js

@ -2187,26 +2187,7 @@ var CUSTOM_TESTS = [
} }
}); });
} }
} },
];
describe('Custom Tests', function() {
function generateTest(test) {
(test.disabled ? it.skip : it)(test.description, function(done) {
test.run(function(actual) {
assert.deepEqual(JSON.stringify(actual), JSON.stringify(test.expected));
done();
});
});
}
for (var i = 0; i < CUSTOM_TESTS.length; i++) {
generateTest(CUSTOM_TESTS[i]);
}
});
var DELIMITERS_TO_GUESS_TESTS = [
{ {
description: "Should correctly guess custom delimiter when passed delimiters to guess.", description: "Should correctly guess custom delimiter when passed delimiters to guess.",
expected: "~", expected: "~",
@ -2227,7 +2208,7 @@ var DELIMITERS_TO_GUESS_TESTS = [
} }
]; ];
describe('Delimiters to Guess Tests', function() { describe('Custom Tests', function() {
function generateTest(test) { function generateTest(test) {
(test.disabled ? it.skip : it)(test.description, function(done) { (test.disabled ? it.skip : it)(test.description, function(done) {
test.run(function(actual) { test.run(function(actual) {
@ -2237,7 +2218,7 @@ describe('Delimiters to Guess Tests', function() {
}); });
} }
for (var i = 0; i < DELIMITERS_TO_GUESS_TESTS.length; i++) { for (var i = 0; i < CUSTOM_TESTS.length; i++) {
generateTest(DELIMITERS_TO_GUESS_TESTS[i]); generateTest(CUSTOM_TESTS[i]);
} }
}); });

Loading…
Cancel
Save