forked from balderdashy/sails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated tests to run without globals, and fixed code that was relying…
… on globals being on
- Loading branch information
Showing
14 changed files
with
93 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/integration/fixtures/sampleapp/api/controllers/PetController.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
test/integration/fixtures/sampleapp/api/services/TestService.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,6 @@ module.exports = { | |
}, | ||
models: { | ||
migrate: 'alter' | ||
} | ||
}, | ||
globals: false | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/** | ||
* Test dependencies | ||
*/ | ||
var assert = require('assert'); | ||
var httpHelper = require('./helpers/httpHelper.js'); | ||
var appHelper = require('./helpers/appHelper'); | ||
|
||
describe('globals :: ', function() { | ||
|
||
describe('with default settings', function() { | ||
|
||
var sailsprocess; | ||
var appName = 'testApp'; | ||
|
||
before(function(done) { | ||
this.timeout(15000); | ||
// Build the app | ||
appHelper.buildAndLift(appName, {globals: null}, function(err, sails) { | ||
|
||
sailsprocess = sails; | ||
return done(err); | ||
|
||
}); | ||
|
||
|
||
}); | ||
|
||
after(function() { | ||
|
||
sailsprocess.kill(); | ||
// console.log('before `chdir ../`' + ', cwd was :: ' + process.cwd()); | ||
process.chdir('../'); | ||
// console.log('after `chdir ../`' + ', cwd was :: ' + process.cwd()); | ||
appHelper.teardown(); | ||
}); | ||
|
||
it('lodash should be globalized', function() { | ||
assert(_); | ||
assert.equal(_.name, 'lodash'); | ||
}); | ||
|
||
it('async should be globalized', function() { | ||
assert(async); | ||
}); | ||
|
||
it('sails should be globalized', function() { | ||
assert(sails); | ||
}); | ||
|
||
it('services should be globalized', function() { | ||
assert(TestService); | ||
}); | ||
|
||
it('models should be globalized', function() { | ||
assert(User); | ||
}); | ||
|
||
|
||
}); | ||
|
||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters