Skip to content

Commit

Permalink
Make browser testing more sensical
Browse files Browse the repository at this point in the history
  • Loading branch information
petkaantonov committed Dec 22, 2014
1 parent ee55ac7 commit a986b60
Show file tree
Hide file tree
Showing 18 changed files with 2,407 additions and 33,399 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ benchmark/async-compare/node_modules/*
benchmark/promises-benchmark/node_modules/*
benchmark/promises-benchmark/fixtures/*
benchmark/perf-promises/node_modules/*
browser/main.js
async
sync
browser/bundle.js
mixed
bench.json
js/bluebird_sync.min.js
Expand Down
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
language: node_js
node_js:
- '0.10'
install: 'npm install grunt grunt-contrib-jshint grunt-contrib-watch acorn q mocha sinon grunt-cli grunt-contrib-connect grunt-saucelabs mkdirp'
install: 'npm install browserify grunt grunt-contrib-jshint grunt-contrib-watch acorn q mocha sinon grunt-cli grunt-contrib-connect grunt-saucelabs mkdirp'
before_script:
- git submodule update --init --recursive
script: 'grunt test --ci && grunt test-browser --ci'
env:
global:
- secure: lFeRife2Lr6vaiVAKjRg2VyTP8Gu+1z6i0JeQ4w6BfAbIkpAgFLOsyVH5QGlnmOLclBtMIHMcNGOCH3RfozVd26TPZMPslPCgh4zal0hCYQHE1n0Cpqsq/m7aA8WlhYd2RGx4A/zZaJ5ZVhUPLnpAAnEocslMsW4aRzkb3aJHIs=
- secure: U4//Sr89P3kGimkmxRr7gqYRtvaoy4HQXtPIORAlIX1BPXxS4EJ63JCgbEtqNSnIZ0/ybjTlpT7AHcBkMUX7BWjQojTj4sEmUeYe4jorK8NVCpam3r99q5XhsdFzJ3t2R0pLiC4q9GyuTyUitJmZ4U7jHbrXkfh7UJ3FdqIECv4=
script: 'grunt test --ci && npm run browsers && grunt test-browser --ci'
18 changes: 9 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ module.exports = function( grunt ) {
function getBrowsers() {
//Terse format to generate the verbose format required by sauce
var browsers = {
"internet explorer|WIN8": ["10"],
"internet explorer|WIN8.1": ["11"],
"firefox|Windows 7": ["3.5", "4", "25"],
"chrome|Windows 7": null,
"safari|Windows 7": ["5"],
"iphone|OS X 10.8": ["6.0"]
"internet explorer|Windows XP": ["7", "8"],
"internet explorer|Windows 7": ["9"],
"firefox|Windows 7": ["3.5", "4", "25", "33"],
"chrome|Windows 7": ["beta"],
"safari|Windows 7": ["5"]
};

var ret = [];
Expand All @@ -51,7 +50,7 @@ module.exports = function( grunt ) {
}
else {
ret.push({
browserName: browser,
browserNAme: browser,
platform: platform
});
}
Expand Down Expand Up @@ -326,9 +325,10 @@ module.exports = function( grunt ) {
all: {
options: {
urls: ["http://127.0.0.1:9999/index.html"],
tunnelTimeout: 5,
tunnelTimeout: 30,
build: process.env.TRAVIS_JOB_ID,
concurrency: 3,
maxPollRetries: 3,
throttled: 3,
browsers: getBrowsers(),
testname: "mocha tests",
tags: ["master"]
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,9 @@ The reason for the unusual way of testing is because the majority of tests are f

To test in browsers:

cd browser
setup
npm run browsers

Then open the `index.html` in your browser. Requires bash (on windows the mingw32 that comes with git works fine too).
Then open the `browser/index.html` in your browser.

You may also [visit the github hosted page](http://petkaantonov.github.io/bluebird/browser/).

Expand Down
Loading

0 comments on commit a986b60

Please sign in to comment.