Skip to content

Commit

Permalink
Updates tests for duo
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Rogers <chrissrogers@gmail.com>
  • Loading branch information
chrissrogers committed Oct 15, 2014
1 parent 3eff186 commit 6422b34
Show file tree
Hide file tree
Showing 12 changed files with 5,090 additions and 27 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
node_modules
npm-debug.log

build

test/build.js
test/components
test/server/pid.txt

Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
- secure: hP6DZjohCePpsqNoD0gzaOwWij4GIh3znS0SY87HCVzsymkrL23t0R4vKxmqOp+qQ3erSwDFT0B6NImWMnIhroIBNzWXrZ8AsT8PACv/fCOzxpR0UuiBOZMPXnkCzygoSmLYF/Xg72kyDSAABdWNwPxLEc0tBIH/e0iN8G2R2sg=
- secure: jQt9v3zZAKmq774J4TOm8a6Zgxea83faf++RRM3azsgLSz5vLfZK6IH4UiC9SmiMZVTYa87mTA71+IO8Mg0lUDJoF8F3EHB+U957el4fDdGak5OULz6FCh0tME1lsstHi+GJ3GtdJGA1DsC6bUR+DsPB5anZZ+wl3QGdUCJToeY=
- secure: Bv5h9pXMa5O0EdOuN2Dt1n9/+T1dMHimnn6XQb0ozjfwzjfhcPR6eKHkOxDVJ0c1rzne48ql0FK0P42QaCdZpEmy8wUyUTmI1gTMhjILcFbQFk+r9GOwGJsPttLNRS2J9+8u5tEDZjf5LiCnPBjy6vIinK7nlas93xTLTQwNEmI=
- secure: yIrHdkLhWtO37N24cRU71PK80zvkPzlJ1Jm+1MS3C6/icgJ8At1N/UgpBdxuBs1tlJm1O7Ahk+/MhpGWlspx9tCF7Hzw9Rj0xpKhqsvM155zgH582xNPwNebiCr/tmsH2/ELgFBBgC9sCW5luzeKx9nyuedGA4fmD2fK5Phc5EE=
matrix:
- BROWSER: chrome
- BROWSER: firefox
Expand Down
9 changes: 3 additions & 6 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@ PID = server/pid.txt
BIN = ../node_modules/.bin
BROWSERS ?= 'chrome, safari, firefox'
TEST = http://localhost:$(PORT)
COMPONENT = $(BIN)/component
DUO = $(BIN)/duo
GRAVY = $(BIN)/gravy
PHANTOMJS = $(BIN)/mocha-phantomjs \
--setting local-to-remote-url-access=true \
--setting-web-security=false

build: components
@$(COMPONENT) build

components: component.json
@$(COMPONENT) install
build:
@$(DUO) index.js > build.js

server: kill
@PORT=$(PORT) node server &> /dev/null &
Expand Down
5 changes: 2 additions & 3 deletions test/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
"dependencies": {
"component/bind": "*",
"component/assert": "*",
"ianstormtaylor/sinon": "*",
"yields/gravy": "*",
"component/each": "*",
"chrissrogers/noop": "*",
"component/querystring": "*"
"component/querystring": "*",
"yields/gravy": "*"
}
}
2 changes: 2 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

window.gravy = require('gravy');

require('./unit/recurly.test.js');
require('./unit/configure.test.js');
require('./unit/open.test.js');
Expand Down
7 changes: 3 additions & 4 deletions test/server/coverage.jade
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ doctype html
html
head
title recurly.js coverage
link(rel='stylesheet', href='build/build.css')
script(src='test/server/mocha.js')
script(src='/test/server/mocha.js')
script
mocha.setup({ ui: 'bdd' })
script(src='build/build.js')
script(src='/test/build.js')
script
cov = require('coverage')('recurly');
script(src='test/recurly.test.js')
script(src='/recurly.js')
body
#coverage
#mocha(style='display: none;')
Expand Down
13 changes: 5 additions & 8 deletions test/server/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ html
title recurly.js tests
link(rel='stylesheet', href='/test/server/mocha.css')
script(src='/recurly.js')
script(src='/test/server/sinon.js')
script(src='/test/server/mocha.js')
script.
mocha.setup({ ui: 'bdd' })
script(src='/test/build/build.js')
script.
require('recurly-js-test');
script(src='/test/build.js')
body
#mocha
script.
if (window.mochaPhantomJS) {
mochaPhantomJS.run();
} else {
require('gravy')(mocha.run());
}
var m = window.mochaPhantomJS || window.mocha;
var g = window.gravy || function () {};
g(m.run());
Loading

0 comments on commit 6422b34

Please sign in to comment.