Commit Graph

17 Commits

Author SHA1 Message Date
Ryan Graham b0959b7ad8 test: use ephemeral port for e2e server 2016-02-04 15:35:19 +01:00
Miroslav Bajtoš 581df35d22 Gruntfile: disable debug & watch for CI builds
This fixes the following error on io.js:

Fatal error: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at String.match (native)
    at Object.exports.fromSource (node_modules/karma-browserify/node_modules/convert-source-map/index.js:109:19)
    at updateSourceMap (node_modules/karma-browserify/lib/bro.js:326:23)
    at Browserify.<anonymous> (node_modules/karma-browserify/lib/bro.js:351:9)
    at Browserify.g (events.js:257:16)
    at emitTwo (events.js:92:20)
    at Browserify.emit (events.js:169:7)
    at node_modules/karma-browserify/lib/bro.js:263:11
    at node_modules/browserify/index.js:758:13
    at ConcatStream.<anonymous> (node_modules/browserify/node_modules/concat-stream/index.js:36:43)
2015-05-04 18:30:01 +02:00
Miroslav Bajtoš 2aa09ba574 Add `loopback.runInContext`
Refactor the core implementation of current context from
server/middleware/context.js into server/current-context.js.

Expose new public API:
 - loopback.runInContext
 - loopback.createContext
2015-03-27 19:12:17 +01:00
Miroslav Bajtoš 295c1534c9 test: don't warn about running deprecated paths 2015-03-03 14:34:05 +01:00
Raymond Feng cb2f40bb86 Fix bcrypt issues for browserify 2014-12-08 14:59:21 -08:00
Rob Halff 36e1f6840c fix jscs errors 2014-11-21 03:35:36 +01:00
Rob Halff 38757c1c88 enable jshint for tests 2014-11-21 02:57:22 +01:00
Miroslav Bajtoš 7fc66a182e Move middleware sources to `server/middleware`
The new location allows developer to use the following identifiers
when loading the middleware using the new declarative style:

    app.middlewareFromConfig(
      require('loopback/server/middleware/rest'),
      { phase: 'routes' });

    app.middlewareFromConfig(
      require('loopback/server/middleware/url-not-found'),
      { phase: 'final' });
2014-11-12 12:44:34 +01:00
Miroslav Bajtoš dc762d2514 common: coding style cleanup 2014-11-04 13:52:49 +01:00
Miroslav Bajtoš 48d4ed28d3 Coding style cleanup (Gruntfile, lib)
- Gruntfile: add `jshint` and `jscs` as deps of `grunt test`
 - Gruntfile: temporarily disable checks of `test` scripts
 - .jscsrc: relax jsdoc validation
 - .jshintrc: relax the rule for property access via dot notation
 - lib: fix remaining style issues
2014-11-04 08:25:35 +01:00
Rob Halff 33096dafa7 Enable jscs for `lib`, fix style violations 2014-11-04 08:25:33 +01:00
Rob Halff 34f1aa354b split jshint task for test & lib 2014-10-22 18:47:53 +02:00
Miroslav Bajtoš 50816ebbe3 Fix loopback in PhantomJS, fix karma tests
- Move configuration of Karma unit-tests from `Gruntfile.js` to a
  standalone file (`test/karma.conf.js`).

- Add a new Grunt task `karma:unit-ci` to run Karma unit-tests in
  PhantomJS and produce karma-xunit.xml file that can be consumed
  by the CI server.

- Add grunt-mocha-test, configure it to run unit-tests.

- Add `grunt test` task that runs both karma and mocha tests,
  detects Jenkins to produce XML output on CI server.

- Modify the `test` script in `package.json` to run
  `grunt mocha-and-karma` (an alias for `grunt test`).
  The alias is required to trick `sl-ci-run` to run `npm test`
  instead of calling directly `mocha`.

- Add `es5-shim` module to karma unit-tests in order to provide
  ES5-methods required by LoopBack.

- Fix `mixin(source)` in lib/loopback.js to work in PhantomJS.
  `Object.getOwnPropertyDescriptor()` provided by `es5-shim` does not
  work in the same way as in Node.
2014-06-26 13:30:09 +02:00
Miroslav Bajtoš 26874fc715 Make app.get/app.set available in browser
Implement settings object and methods in browser-express.

Add test/app.test.js to unit-tests run by karma.
2014-06-03 21:32:27 +02:00
Ritchie Martori b660f8a59e Add replication e2e tests 2014-04-16 07:33:17 -07:00
Ritchie Martori 7c0a470d64 Add basic Remote connector e2e test 2014-04-14 12:25:41 -07:00
Ritchie Martori e7f64a3abf Add karma for running browser tests 2014-02-12 10:17:02 -08:00