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) { ...@@ -230,10 +230,10 @@ module.exports = function(grunt) {
230 jsManifests += ',\n'; 230 jsManifests += ',\n';
231 } 231 }
232 232
233 if ((/\.json$/).test(abspath)) { 233 if ((/\.js$/).test(abspath)) {
234 234
235 // append the JSON 235 // append the expected parse
236 jsExpected += ' "' + basename(filename, '.json') + '": ' + 236 jsExpected += ' "' + basename(filename, '.js') + '": ' +
237 grunt.file.read(abspath) + ',\n'; 237 grunt.file.read(abspath) + ',\n';
238 } 238 }
239 }); 239 });
......
1 var grunt = require('grunt'),
2 extname = require('path').extname;
3
4 grunt.file.recurse(process.cwd(), function(path) {
5 var json;
6 if (extname(path) === '.json') {
7 json = grunt.file.readJSON(path);
8 if (json.totalDuration) {
9 delete json.totalDuration;
10 grunt.file.write(path, JSON.stringify(json, null, ' '));
11 }
12 }
13 });