diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..94c28c09 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "0.10" + +script: + - grunt test diff --git a/README.md b/README.md index bfdce655..c3c18f36 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/lhorie/mithril.js.svg?branch=master)](https://travis-ci.org/lhorie/mithril.js) + # Mithril A Javascript Framework for Building Brilliant Applications diff --git a/archive/v0.1.1/mithril-tests.js b/archive/v0.1.1/mithril-tests.js index 1415912b..9bec759a 100644 --- a/archive/v0.1.1/mithril-tests.js +++ b/archive/v0.1.1/mithril-tests.js @@ -432,7 +432,12 @@ test.print = function(print) { print(test.failures[i].toString()) } print("tests: " + test.total + "\nfailures: " + test.failures.length) + + if (test.failures.length > 0) { + throw new Error(test.failures.length + " tests did not pass") + } } + var mock = {} mock.window = new function() { var window = {} diff --git a/tests/test.js b/tests/test.js index a8d0e0cc..ccb6269a 100644 --- a/tests/test.js +++ b/tests/test.js @@ -10,4 +10,8 @@ test.print = function(print) { print(test.failures[i].toString()) } print("tests: " + test.total + "\nfailures: " + test.failures.length) -} \ No newline at end of file + + if (test.failures.length > 0) { + throw new Error(test.failures.length + " tests did not pass") + } +}