2bc4731f by David LaPalomento

Rename parsed manifests from json to js

Custom IVs are naturally expressed as Uint8Arrays but our expected manifest format was json. Swap to plain JS so we don't have to do anything hacky for testing with custom IVs.
1 parent 45968d1e
Showing 41 changed files with 3 additions and 16 deletions
......@@ -230,10 +230,10 @@ module.exports = function(grunt) {
jsManifests += ',\n';
}
if ((/\.json$/).test(abspath)) {
if ((/\.js$/).test(abspath)) {
// append the JSON
jsExpected += ' "' + basename(filename, '.json') + '": ' +
// append the expected parse
jsExpected += ' "' + basename(filename, '.js') + '": ' +
grunt.file.read(abspath) + ',\n';
}
});
......
var grunt = require('grunt'),
extname = require('path').extname;
grunt.file.recurse(process.cwd(), function(path) {
var json;
if (extname(path) === '.json') {
json = grunt.file.readJSON(path);
if (json.totalDuration) {
delete json.totalDuration;
grunt.file.write(path, JSON.stringify(json, null, ' '));
}
}
});