Skip to content

Commit

Permalink
added intern
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniespratley committed Dec 11, 2014
1 parent d28d3bb commit 17c7689
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"gulp-ngmin": "^0.3.0",
"gulp-protractor": "0.0.11",
"gulp-uglify": "^1.0.2",
"intern": "^2.2.2",
"jasmine-core": "^2.1.2",
"jasmine-node": "~1.11.0",
"jasmine-reporters": "^1.0.1",
Expand Down
77 changes: 77 additions & 0 deletions test/intern.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// Learn more about configuring this file at <https://github.com/theintern/intern/wiki/Configuring-Intern>.
// These default settings work OK for most people. The options that *must* be changed below are the
// packages, suites, excludeInstrumentation, and (if you want functional tests) functionalSuites.
/*
SAUCE_USERNAME=jonniespratleyge SAUCE_ACCESS_KEY=66f8830c-ec8f-441c-8f06-e8947d830a90 ./node_modules/.bin/intern-runner config=tests/intern
*/

define({
//sauce connect
tunnelOptions: {
username: 'jonniespratleyge',
accessKey: '66f8830c-ec8f-441c-8f06-e8947d830a90'
},
// The port on which the instrumenting proxy will listen
proxyPort: 9900,

// A fully qualified URL to the Intern proxy
proxyUrl: 'http://localhost:9900/',

// Default desired capabilities for all environments. Individual capabilities can be overridden by any of the
// specified browser environments in the `environments` array below as well. See
// https://code.google.com/p/selenium/wiki/DesiredCapabilities for standard Selenium capabilities and
// https://saucelabs.com/docs/additional-config#desired-capabilities for Sauce Labs capabilities.
// Note that the `build` capability will be filled in with the current commit ID from the Travis CI environment
// automatically
capabilities: {
'selenium-version': '2.41.0'
},

// Browsers to run integration testing against. Note that version numbers must be strings if used with Sauce
// OnDemand. Options that will be permutated are browserName, version, platform, and platformVersion; any other
// capabilities options specified for an environment will be copied as-is
environments: [
{ browserName: 'internet explorer', version: '11', platform: 'Windows 8.1' },
{ browserName: 'internet explorer', version: '10', platform: 'Windows 8' },
{ browserName: 'internet explorer', version: '9', platform: 'Windows 7' },
{ browserName: 'firefox', version: '28', platform: [ 'OS X 10.9', 'Windows 7', 'Linux' ] },
{ browserName: 'chrome', version: '34', platform: [ 'OS X 10.9', 'Windows 7', 'Linux' ] },
{ browserName: 'safari', version: '6', platform: 'OS X 10.8' },
{ browserName: 'safari', version: '7', platform: 'OS X 10.9' }
],

// Maximum number of simultaneous integration tests that should be executed on the remote WebDriver service
maxConcurrency: 3,

// Name of the tunnel class to use for WebDriver tests
tunnel: 'SauceLabsTunnel',

// The desired AMD loader to use when running unit tests (client.html/client.js). Omit to use the default Dojo
// loader
useLoader: {
'host-node': 'dojo/dojo',
'host-browser': 'node_modules/dojo/dojo.js'
},

// Configuration options for the module loader; any AMD configuration options supported by the specified AMD loader
// can be used here
loader: {
// Packages that should be registered with the loader in each testing environment
packages: [ { name: 'myPackage', location: '.' } ]
},

// Non-functional test suite(s) to run in each browser
suites: [
'tests/hello'
/* 'myPackage/tests/foo',
'myPackage/tests/bar' */
],

// Functional test suite(s) to run in each browser once non-functional tests are completed
functionalSuites: [
'tests/functional/index'
/* 'myPackage/tests/functional' */ ],

// A regular expression matching URLs to files that should not be included in code coverage analysis
excludeInstrumentation: /^(?:tests|node_modules)\//
});
10 changes: 8 additions & 2 deletions test/routes/cms-passport-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ config.port = 9191

var cmsPassport = require(process.cwd() + '/routes/cms-passport')(config, app);
describe('cms-passport', function () {

it('should have /account route', function (done) {
done();
});
it('should have /auth/login route', function (done) {
//
});

it('POST - /login - should return user on successful login', function (done) {
it('POST - /login - should return user on successful login', function (done) {
var validUser = {
username: '[email protected]',
password: 'test'
Expand All @@ -27,7 +29,7 @@ describe('cms-passport', function () {
.expect("Content-Type", /json/)
.expect(200, done);
});
});


it('POST - /register - should return user on successful registation', function (done) {
request(app)
Expand All @@ -44,10 +46,14 @@ describe('cms-passport', function () {
.expect("Content-Type", /json/)
.expect(201, done);
});



it('should have /auth/register route', function (done) {
//
done();
});

it('should have /auth/me route', function (done) {
//
done();
Expand Down

0 comments on commit 17c7689

Please sign in to comment.