Skip to content

🚧 ⚡ debugging NAN compile failures #1122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
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
17 changes: 12 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
branches:
only:
- master
# branches:
# only:
# - master
language: node_js
node_js:
- "4.3"
env:
global:
global:
- COVERAGE_OPTION='./node_modules/babel-istanbul/lib/cli.js cover -x **/spec/**'
- CXX=g++-4.8
matrix:
- MONGODB_VERSION=2.6.11
- MONGODB_VERSION=3.0.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
cache:
directories:
- $HOME/.mongodb/versions/downloads
- node_modules/
after_success: ./node_modules/.bin/codecov
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@
"scripts": {
"dev": "npm run build && node bin/dev",
"build": "./node_modules/.bin/babel src/ -d lib/",
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.0.8} ./node_modules/.bin/mongodb-runner start",
"test": "cross-env NODE_ENV=test TESTING=1 ./node_modules/.bin/babel-node $COVERAGE_OPTION ./node_modules/jasmine/bin/jasmine.js",
"test:win": "npm run pretest && cross-env NODE_ENV=test TESTING=1 ./node_modules/.bin/babel-node ./node_modules/babel-istanbul/lib/cli.js cover -x **/spec/** ./node_modules/jasmine/bin/jasmine.js && npm run posttest",
"posttest": "./node_modules/.bin/mongodb-runner stop",
"coverage": "cross-env COVERAGE_OPTION='./node_modules/babel-istanbul/lib/cli.js cover -x **/spec/**' npm test",
"start": "node ./bin/parse-server",
"prepublish": "npm run build"
Expand Down
14 changes: 14 additions & 0 deletions spec/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ Parse.serverURL = 'http://localhost:' + port + '/1';
// TODO: update tests to work in an A+ way
Parse.Promise.disableAPlusCompliant();

process.env.DEBUG = 'mon*';

// Travis will set this environment variable so we always test against
// MongoDB 2.6.11 and 3.0.8. Set the default here so when devs just
// run `npm test` locally [email protected] will be installed if needed and
// used.
if (!process.env.MONGODB_VERSION) {
process.env.MONGODB_VERSION = '3.0.8';
}

// Start MongoDB before running the test suite and stop it afterwards.
beforeAll(require('mongodb-runner/mocha/before'));
afterAll(require('mongodb-runner/mocha/after'));

beforeEach(function(done) {
restoreServerConfiguration();
Parse.initialize('test', 'test', 'test');
Expand Down