Commit Graph

32 Commits

Author SHA1 Message Date
Diana Lau f788aae464 chore: update copyright year 2020-01-21 14:19:18 -05:00
Miroslav Bajtoš 397d141036
fixup! eslint --fix .
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-10-07 11:54:59 +02:00
Miroslav Bajtoš 5dd9561cb6
chore: update dev-dependencies
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-10-07 11:54:59 +02:00
Miroslav Bajtoš 8311138f3e
test: disable Chrome sandboxing when inside Docker
See the discussion in
https://github.com/docker/for-linux/issues/496

Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-10-01 09:27:02 +02:00
Miroslav Bajtoš cceb8a3c26
test: switch from PhantomJS to HeadlessChrome
Rework browser tests to run in Headless Chrome instead of PhantomJS,
because the latter is no longer maintained.

This allows us to remove transpilation to ES5 via babelify, which
significantly improves speed of our tests.

Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-10-01 09:12:17 +02:00
virkt25 cab1ed5463 chore: use grunt to install optional phantomjs
connected to #3993
2018-09-12 11:02:14 -04:00
Thomas Leah 0dac936bba add: ppc64 and s390x to not run UI tests 2018-08-08 15:27:29 -04:00
Justin Ross 60750b4508
Update Copyright Years
Update copyright years to include 2018
2018-01-16 13:55:02 +01:00
Miroslav Bajtoš 93ab8644c4 Use English when running Mocha tests 2017-01-26 10:11:08 +01:00
Miroslav Bajtoš 70eecfab70 Upgrade eslint-config to 7.x 2017-01-06 12:12:35 +01:00
Loay 06cb481c3f Update eslint to loopback config v5
Notable side-effects:
 - loopback no longer exports "caller" and "arguments" properties
 - kv-memory connector is now properly added to the connector registry
 - the file "test/support.js" was finally removed
2016-11-22 14:08:02 +01:00
Miroslav Bajtoš 0cd157ca3d Temporarily disable Karma tests on Windows CI
We are observing frequent test failures on Windows CI, where PhantomJS
cannot start because there are no free handles available. Finding
and fixing the process leaking handles is non-trivial and will take
long time.

This commit disables Karma tests on Windows CI machines to prevent
build failures that we are ignoring anyways.
2016-09-22 10:49:00 +02:00
Miroslav Bajtoš b087c930ed Remove current-context API
Change all current-context APIs to throw a helpful error.
2016-08-10 13:43:40 +02:00
Ryan Graham 6964914bab
update copyright statements 2016-05-03 15:50:21 -07:00
Miroslav Bajtoš f9702b0ace Use eslint with loopback config
Drop jshint and jscs in favour of eslint.

Fix style violations.

While we are at this, reduce the max line length from 150 to 100.
2016-04-06 10:45:30 +02:00
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