diff --git a/meteor/tests/test_fonts.js b/meteor/tests/test_fonts.js deleted file mode 100644 index 40c208162..000000000 --- a/meteor/tests/test_fonts.js +++ /dev/null @@ -1,14 +0,0 @@ -// Check that the font files are downloadable. Meteor places assets at /packages//. -['eot', 'otf', 'svg', 'ttf', 'woff'].forEach(function (ext) { - Tinytest.addAsync(ext + ' fonts are shipped', function (test, done) { - HTTP.get('/packages/semantic_ui/dist/themes/default/assets/fonts/icons.' + ext, function callback(error, result) { - if (error) { - test.fail({message: 'Font failed to load'}); - } else { - test.isTrue(result.content.length > 10000, ext + ' font could not be downloaded'); - } - - done(); - }); - }); -}); \ No newline at end of file diff --git a/tasks/admin/templates/package.js b/tasks/admin/templates/package.js index 59fcf8038..c6df8250c 100644 --- a/tasks/admin/templates/package.js +++ b/tasks/admin/templates/package.js @@ -23,7 +23,7 @@ Package.onTest(function(api) { ], where); api.addFiles([ - 'meteor/tests/test_fonts.js', - 'meteor/tests/test_images.js', + 'test/meteor/fonts.js', + 'test/meteor/assets.js', ], where); }); diff --git a/meteor/tests/test_images.js b/test/meteor/assets.js similarity index 88% rename from meteor/tests/test_images.js rename to test/meteor/assets.js index 0b87a8e5f..40f4b40ec 100644 --- a/meteor/tests/test_images.js +++ b/test/meteor/assets.js @@ -1,20 +1,20 @@ -var images = [ +var assets = [ 'dist/themes/default/assets/images/flags.png', ]; // Check that the font files are downloadable. Meteor places assets at /packages//. -images.forEach(function (path) { +assets.forEach(function (path) { Tinytest.addAsync('image ' + path + ' is shipped', function (test, done) { HTTP.get('/packages/semantic_ui/' + path, function callback(error, result) { if (error) { test.fail({message: 'Image failed to load'}); - } else { + } + else { test.isTrue(result.content.length > 10000, 'Image ' + path + ' could not be downloaded'); } - done(); }); }); }); - + diff --git a/test/meteor/fonts.js b/test/meteor/fonts.js new file mode 100644 index 000000000..195d5159b --- /dev/null +++ b/test/meteor/fonts.js @@ -0,0 +1,16 @@ +// Check that the font files are downloadable. Meteor places assets at /packages//. +['eot', 'otf', 'svg', 'ttf', 'woff'] + .forEach(function (extension) { + Tinytest.addAsync(extension + ' fonts are shipped', function (test, done) { + HTTP.get('/packages/semantic_ui/dist/themes/default/assets/fonts/icons.' + extension, function callback(error, result) { + if (error) { + test.fail({message: 'Font failed to load'}); + } + else { + test.isTrue(result.content.length > 10000, extension + ' font could not be downloaded'); + } + done(); + }); + }); + }) +; \ No newline at end of file