mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 10:58:23 -05:00
17 lines
581 B
JavaScript
17 lines
581 B
JavaScript
|
var fs = require('fs');
|
||
|
var path = require('path');
|
||
|
var tap = require('tap');
|
||
|
|
||
|
var buildLocales = require('../../bin/lib/locale-compare');
|
||
|
|
||
|
tap.test('buildLocalesFile', function (t) {
|
||
|
var actualMd5map = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../fixtures/test_es_md5map.json'), 'utf8'));
|
||
|
var templates = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../fixtures/build_locales.json'), 'utf8'));
|
||
|
var testMd5map = buildLocales.getMD5Map(templates);
|
||
|
|
||
|
for (var key in actualMd5map) {
|
||
|
t.ok(testMd5map[key] !== undefined);
|
||
|
}
|
||
|
t.end();
|
||
|
});
|