Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ install:
- npm install -g bower
- npm install
- bower install
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- npm run travis
after_script:
Expand Down
13 changes: 10 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var uglify = require("gulp-uglify");
var karma = require("gulp-karma");

// Determine if this is being run in Travis
var travis = (process.argv.indexOf('--travis') > -1);
var travis = false;


/****************/
Expand Down Expand Up @@ -97,6 +97,7 @@ gulp.task("test", function() {
return gulp.src(paths.tests.files)
.pipe(karma({
configFile: paths.tests.config,
browsers: travis ? ["Firefox"] : ["Chrome"],
action: "run"
}))
.on("error", function(error) {
Expand All @@ -112,5 +113,11 @@ gulp.task("watch", function() {
/* Builds the distribution files */
gulp.task("build", ["scripts"]);

/* Runs the "test" and "scripts" tasks by default */
gulp.task("default", ["test", "scripts"]);
/* Tasks to be run within Travis CI */
gulp.task("travis", function() {
travis = true;
gulp.start("build", "test");
});

/* Runs the "scripts" and "test" tasks by default */
gulp.task("default", ["build", "test"]);
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@
"gulp-uglify": "^0.2.1",
"jshint-stylish": "^0.2.0",
"karma": "^0.12.16",
"karma-chrome-launcher": "^0.1.5",
"karma-coverage": "^0.2.4",
"karma-failed-reporter": "0.0.2",
"karma-firefox-launcher": "^0.1.3",
"karma-jasmine": "~0.2.0",
"karma-phantomjs-launcher": "~0.1.4",
"karma-spec-reporter": "0.0.13",
"streamqueue": "^0.1.1"
},
"scripts": {
"test": "gulp test",
"travis": "gulp --travis"
"travis": "gulp travis"
}
}
2 changes: 0 additions & 2 deletions tests/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Configuration file for Karma test runner
module.exports = function(config) {
config.set({
frameworks: ["jasmine"],
browsers: ["PhantomJS"],
autowatch: false,
singleRun: true,

Expand Down
5 changes: 1 addition & 4 deletions tests/specs/common.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
// Override the default timeout interval for Jasmine
jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000;

// Get a reference to a random demo Firebase
var demoFirebaseUrl = "https://" + generateRandomString() + ".firebaseio-demo.com";

// React test addon
var ReactTestUtils = React.addons.TestUtils;

Expand All @@ -21,7 +18,7 @@ var invalidBindVars = ["", 1, true, false, [], {}, [1, 2], {a: 1}, null, undefin
/* Helper function which runs before each Jasmine test has started */
function beforeEachHelper(done) {
// Create a new firebase ref with a new context
firebaseRef = new Firebase(demoFirebaseUrl, Firebase.Context());
firebaseRef = new Firebase("https://tests.firebaseio.com", Firebase.Context());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a special Firebase? or just a normal one that we own?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just a Firebase that Rob owns that we use in a lot of test suites. It's set to read true/write true and has no important data in it. I switched it from a demo Firebase because the Firebase client was having issues connecting to the demo Firebase for some reason. I'm going to work with Rob today to figure out why that was the case with firebaseio-demo.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Demo has been fixed - it had some mitigation for POODLE that was causing issues with Firefox


// Reset the Firebase
firebaseRef.remove(function() {
Expand Down