Merge pull request from rschamp/l10n-spam

Don't create a separate test for each l10n json
This commit is contained in:
Ray Schamp 2019-01-11 12:20:19 -05:00 committed by GitHub
commit 348403a407
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,17 +11,13 @@ const checkJson = (data, name) => {
} catch (e) {
tap.fail(name + ' has invalid Json.\n');
}
tap.pass();
};
files.forEach(function (f) {
tap.test('check valid json', function (t) {
fs.readFile(f, function (err, data) {
if (err) {
throw err;
}
checkJson(data, f);
});
t.end();
tap.test('check valid json', function (t) {
files.forEach(function (f) {
const data = fs.readFileSync(f);
checkJson(data, f);
});
t.pass();
t.end();
});