Run PhantomJS's tests as part of TravisCI

Related to #11952.
1.x
Ivan De Marino 2014-02-17 23:30:41 +00:00
parent ba5998f74e
commit 77b5de1362
4 changed files with 12 additions and 5 deletions

View File

@ -9,7 +9,9 @@ install:
- sudo apt-get -yq install build-essential chrpath libssl-dev libfontconfig1-dev #< Build Dependencies
before_script:
- chmod +x ./build.sh
- chmod +x ./test/run-tests.sh
- chmod +x ./test/run-tests-ghostdriver.sh
script:
- ./build.sh --confirm --silent #< Build
- ./test/run-tests.sh #< Test (PhantomJS)
- ./test/run-tests-ghostdriver.sh #< Test (GhostDriver / PhantomJSDriver)

View File

@ -123,11 +123,11 @@ jasmine.ConsoleReporter = function(print, doneCallback, showColors) {
if (results.skipped) {
yellowStar();
} else {
if (results.passed()) {
print('#' + spec.id + ' ' + spec.suite.description + ': ' + spec.description);
if (results.passed()) {
print('#' + spec.id + ' ' + spec.suite.description + ': ' + spec.description);
greenPass();
} else {
print(redStr('#' + spec.id + ' ' + spec.suite.description + ': ' + spec.description));
print(redStr('#' + spec.id + ' ' + spec.suite.description + ': ' + spec.description));
redFail();
}
}
@ -172,4 +172,4 @@ jasmine.ConsoleReporter = function(print, doneCallback, showColors) {
summaryFunction(runner.specs().length, results.failedCount);
doneCallback(runner);
};
};
};

View File

@ -99,7 +99,6 @@ describe("phantom global object", function() {
waits(0);
runs(function() {
console.log(stack);
expect(stack[0].file).toEqual(helperFile);
expect(stack[0].line).toEqual(2);
phantom.onError = phantom.defaultErrorHandler;

6
test/run-tests.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# Run tests
bin/phantomjs test/run-tests.js
exit $?