diff --git a/package.js b/package.js index a798057..bf2d424 100644 --- a/package.js +++ b/package.js @@ -15,3 +15,13 @@ Package._transitional_registerBuildPlugin({ 'lodash': '2.4.1' } }); + +Package.onTest(function(api) { + api.use(['test-helpers', 'tinytest']); + api.use(['ui', 'templating', 'stevezhu:sass']); + api.addFiles([ + 'tests/test.scss', + 'tests/test.html', + 'tests/test.js' + ], 'client'); +}); diff --git a/tests/test.html b/tests/test.html new file mode 100644 index 0000000..69e2541 --- /dev/null +++ b/tests/test.html @@ -0,0 +1,3 @@ + diff --git a/tests/test.js b/tests/test.js new file mode 100644 index 0000000..65a23e0 --- /dev/null +++ b/tests/test.js @@ -0,0 +1,9 @@ +Tinytest.add("Sass - Is working", function(test) { + var renderedTemplate = UI.render(Template.testTemplate); + UI.insert(renderedTemplate, document.body); + + var elem = document.getElementById('test-elem'); + test.equal(getStyleProperty(elem, 'display'), 'none', "Expected display: none;") + + UI.remove(renderedTemplate); +}); diff --git a/tests/test.scss b/tests/test.scss new file mode 100644 index 0000000..64b8f48 --- /dev/null +++ b/tests/test.scss @@ -0,0 +1,3 @@ +#test-elem { + display: none; +}