cordova-lib.git
4 years agoAdd failing test for handling failed server launch
Raphael von der Grün [Sat, 8 Sep 2018 15:19:40 +0000 (17:19 +0200)] 
Add failing test for handling failed server launch

4 years agoOrganize imports
Raphael von der Grün [Sat, 8 Sep 2018 15:19:39 +0000 (17:19 +0200)] 
Organize imports

4 years agoImprove tests after improving testability
Raphael von der Grün [Sat, 8 Sep 2018 15:19:38 +0000 (17:19 +0200)] 
Improve tests after improving testability

4 years agoImprove testability of main export
Raphael von der Grün [Sat, 8 Sep 2018 15:19:37 +0000 (17:19 +0200)] 
Improve testability of main export

4 years agoMake use of express default 404
Raphael von der Grün [Sat, 8 Sep 2018 15:19:36 +0000 (17:19 +0200)] 
Make use of express default 404

4 years agoRender index page from a template
Raphael von der Grün [Sat, 8 Sep 2018 15:19:34 +0000 (17:19 +0200)] 
Render index page from a template

The template is virtually identical with the previously generated one.
There's minimal style changes and a few HTML fixes.

4 years agoSimplify absolute path handler
Raphael von der Grün [Sat, 8 Sep 2018 15:19:33 +0000 (17:19 +0200)] 
Simplify absolute path handler

4 years agoRefactor platform serve handler & add tests
Raphael von der Grün [Sat, 8 Sep 2018 15:19:32 +0000 (17:19 +0200)] 
Refactor platform serve handler & add tests

4 years agoUse `md5-file` to calculate MD5 sum of files
Raphael von der Grün [Sat, 8 Sep 2018 15:19:31 +0000 (17:19 +0200)] 
Use `md5-file` to calculate MD5 sum of files

4 years agoCorrectly reject promise when failing
Raphael von der Grün [Sat, 8 Sep 2018 15:19:30 +0000 (17:19 +0200)] 
Correctly reject promise when failing

4 years agoAdd failing test resulting in pending promise
Raphael von der Grün [Sat, 8 Sep 2018 15:19:29 +0000 (17:19 +0200)] 
Add failing test resulting in pending promise

4 years agoFix globby usage in cordova/serve
Raphael von der Grün [Sat, 8 Sep 2018 15:19:28 +0000 (17:19 +0200)] 
Fix globby usage in cordova/serve

4 years agoCB-7078 Rewrite disabled test for serve as unit test
Raphael von der Grün [Sat, 8 Sep 2018 15:19:27 +0000 (17:19 +0200)] 
CB-7078 Rewrite disabled test for serve as unit test

4 years agoRemove support for old option format (#686)
Raphael von der Grün [Fri, 7 Sep 2018 14:38:27 +0000 (16:38 +0200)] 
Remove support for old option format (#686)

Remove support for handling pre-5.4.0 style options

4 years agoRemove unused dependency properties-parser (#685)
Raphael von der Grün [Fri, 7 Sep 2018 14:29:14 +0000 (16:29 +0200)] 
Remove unused dependency properties-parser (#685)

Was not found earlier, since it is "used" in our test fixtures.

4 years agoMerge pull request #677 from raphinesse/fix-addhelper-tests
Raphael von der Grün [Fri, 7 Sep 2018 14:09:22 +0000 (16:09 +0200)] 
Merge pull request #677 from raphinesse/fix-addhelper-tests

Fix `cordova/platform/addHelper` tests

4 years agoFix faking cordova.prepare by faking require 677/head
Raphael von der Grün [Wed, 5 Sep 2018 18:56:04 +0000 (20:56 +0200)] 
Fix faking cordova.prepare by faking require

4 years agoClean up test double setup a bit
Raphael von der Grün [Wed, 5 Sep 2018 19:16:34 +0000 (21:16 +0200)] 
Clean up test double setup a bit

4 years agoFix test in addHelper.spec
Raphael von der Grün [Tue, 14 Aug 2018 18:41:44 +0000 (20:41 +0200)] 
Fix test in addHelper.spec

4 years agoWait for promise in cordova/platform/addHelper.spec
Raphael von der Grün [Tue, 14 Aug 2018 18:00:28 +0000 (20:00 +0200)] 
Wait for promise in cordova/platform/addHelper.spec

4 years agoMerge pull request #679 from raphinesse/platform.spec-cleanup
Raphael von der Grün [Fri, 7 Sep 2018 07:46:19 +0000 (09:46 +0200)] 
Merge pull request #679 from raphinesse/platform.spec-cleanup

platform.spec cleanup

4 years agoMerge pull request #684 from raphinesse/bits-and-pieces
Raphael von der Grün [Fri, 7 Sep 2018 00:08:41 +0000 (02:08 +0200)] 
Merge pull request #684 from raphinesse/bits-and-pieces

Bits and pieces

4 years agoFix two instances of broken Promises 684/head
Raphael von der Grün [Thu, 6 Sep 2018 09:16:05 +0000 (11:16 +0200)] 
Fix two instances of broken Promises

4 years agoDon't fake return values for functions that return `undefined`
Raphael von der Grün [Tue, 4 Sep 2018 23:29:00 +0000 (01:29 +0200)] 
Don't fake return values for functions that return `undefined`

4 years agoReduce test timeout in plugman/install.spec
Raphael von der Grün [Tue, 28 Aug 2018 18:09:33 +0000 (20:09 +0200)] 
Reduce test timeout in plugman/install.spec

4 years agoProperly join paths in plugman/platform
Raphael von der Grün [Tue, 4 Sep 2018 23:18:43 +0000 (01:18 +0200)] 
Properly join paths in plugman/platform

4 years agoStricter checks in cordova/restore-util.spec
Raphael von der Grün [Sun, 26 Aug 2018 19:32:30 +0000 (21:32 +0200)] 
Stricter checks in cordova/restore-util.spec

4 years agoSimplify hooks/Context using `Object.assign`
Raphael von der Grün [Mon, 27 Aug 2018 00:39:06 +0000 (02:39 +0200)] 
Simplify hooks/Context using `Object.assign`

4 years agoRemove unused npm utility functions (#683)
Raphael von der Grün [Thu, 6 Sep 2018 22:16:49 +0000 (00:16 +0200)] 
Remove unused npm utility functions (#683)

This also removes usage of Q-specific functionality (see #681)

4 years agoGH-676 Remove browserify (#682)
Raphael von der Grün [Thu, 6 Sep 2018 22:02:26 +0000 (00:02 +0200)] 
GH-676 Remove browserify (#682)

Resolves #676

4 years agoDo not install two platforms in plugin-focused test 008 679/head
Raphael von der Grün [Thu, 6 Sep 2018 18:20:49 +0000 (20:20 +0200)] 
Do not install two platforms in plugin-focused test 008

4 years agoGet rid of all the extra describe blocks
Raphael von der Grün [Thu, 6 Sep 2018 17:46:28 +0000 (19:46 +0200)] 
Get rid of all the extra describe blocks

4 years agoRemove 006 since it's a subset of 008 since removing --fetch
Raphael von der Grün [Thu, 6 Sep 2018 17:41:09 +0000 (19:41 +0200)] 
Remove 006 since it's a subset of 008 since removing --fetch

4 years agoFix commented-out test parts in 008
Raphael von der Grün [Thu, 6 Sep 2018 16:39:56 +0000 (18:39 +0200)] 
Fix commented-out test parts in 008

4 years agoRe-enable testing platform update
Raphael von der Grün [Thu, 6 Sep 2018 17:29:16 +0000 (19:29 +0200)] 
Re-enable testing platform update

4 years agoMerge tests 002 and 003 as they were doing the same thing
Raphael von der Grün [Thu, 6 Sep 2018 16:35:04 +0000 (18:35 +0200)] 
Merge tests 002 and 003 as they were doing the same thing

4 years agoUse fixture project instead of calling `cordova create`
Raphael von der Grün [Thu, 6 Sep 2018 16:30:23 +0000 (18:30 +0200)] 
Use fixture project instead of calling `cordova create`

4 years agoSilence noisy output caused by `cordova-browser`
Raphael von der Grün [Wed, 5 Sep 2018 23:57:27 +0000 (01:57 +0200)] 
Silence noisy output caused by `cordova-browser`

4 years agoFactor out project creation
Raphael von der Grün [Wed, 5 Sep 2018 23:42:54 +0000 (01:42 +0200)] 
Factor out project creation

4 years agoRe-enable more stuff
Raphael von der Grün [Wed, 5 Sep 2018 23:38:37 +0000 (01:38 +0200)] 
Re-enable more stuff

4 years agoMake use of existing path variables
Raphael von der Grün [Wed, 5 Sep 2018 23:25:52 +0000 (01:25 +0200)] 
Make use of existing path variables

4 years agoRe-enable platform.spec tests 001-003
Raphael von der Grün [Wed, 5 Sep 2018 21:07:00 +0000 (23:07 +0200)] 
Re-enable platform.spec tests 001-003

4 years agoIncrease test timeouts to 2min for all tests
Raphael von der Grün [Wed, 5 Sep 2018 20:47:45 +0000 (22:47 +0200)] 
Increase test timeouts to 2min for all tests

Hopefully will make timeouts like CI-3 in #642 less likely

4 years agoSimpler checking of installed platforms
Raphael von der Grün [Wed, 5 Sep 2018 00:43:17 +0000 (02:43 +0200)] 
Simpler checking of installed platforms

4 years agoFactor out common setup & teardown
Raphael von der Grün [Wed, 5 Sep 2018 00:28:56 +0000 (02:28 +0200)] 
Factor out common setup & teardown

4 years agoDestructure test helpers for easier access
Raphael von der Grün [Wed, 5 Sep 2018 00:17:45 +0000 (02:17 +0200)] 
Destructure test helpers for easier access

4 years agoOrganize imports
Raphael von der Grün [Wed, 5 Sep 2018 00:11:27 +0000 (02:11 +0200)] 
Organize imports

4 years agoUse const and let
Raphael von der Grün [Wed, 5 Sep 2018 00:08:13 +0000 (02:08 +0200)] 
Use const and let

4 years agoUse arrow functions
Raphael von der Grün [Wed, 5 Sep 2018 00:05:49 +0000 (02:05 +0200)] 
Use arrow functions

4 years agoPromise chain formatting
Raphael von der Grün [Tue, 4 Sep 2018 23:48:36 +0000 (01:48 +0200)] 
Promise chain formatting

4 years agoMake plugin.remove more easily understandable (#652)
Raphael von der Grün [Thu, 6 Sep 2018 18:03:16 +0000 (20:03 +0200)] 
Make plugin.remove more easily understandable (#652)

No functional changes. A by-product of debugging this module.

4 years agoMake cordova/platform/check more approachable (#650)
Raphael von der Grün [Thu, 6 Sep 2018 18:02:32 +0000 (20:02 +0200)] 
Make cordova/platform/check more approachable (#650)

This should not change anything regarding functionality just make the
code a _little_ more approachable and less horrible.

This was originally created during an effort to remove Q API usage.

4 years agoFix tests that are failing with npm config 'save-exact' set (#678)
Oliver Salzburg [Thu, 6 Sep 2018 15:30:00 +0000 (17:30 +0200)] 
Fix tests that are failing with npm config 'save-exact' set (#678)

4 years agoMerge pull request #675 from raphinesse/one-root-describe-per-suite
Raphael von der Grün [Wed, 5 Sep 2018 09:34:02 +0000 (11:34 +0200)] 
Merge pull request #675 from raphinesse/one-root-describe-per-suite

One root `describe` per suite

4 years agoMerge pull request #674 from raphinesse/plugman_install-cleanup
Raphael von der Grün [Wed, 5 Sep 2018 09:31:21 +0000 (11:31 +0200)] 
Merge pull request #674 from raphinesse/plugman_install-cleanup

plugman/install.spec cleanup

4 years agoMerge pull request #672 from raphinesse/plugman_uninstall-cleanup
Raphael von der Grün [Wed, 5 Sep 2018 09:29:49 +0000 (11:29 +0200)] 
Merge pull request #672 from raphinesse/plugman_uninstall-cleanup

plugman_uninstall.spec cleanup

4 years agoEnforce one root `describe` per suite 675/head
Raphael von der Grün [Mon, 3 Sep 2018 20:30:49 +0000 (22:30 +0200)] 
Enforce one root `describe` per suite

4 years agoRemove duplicated test from cordova-create
Raphael von der Grün [Mon, 3 Sep 2018 20:08:31 +0000 (22:08 +0200)] 
Remove duplicated test from cordova-create

Instead, only test that calling `create` does not fail

4 years agoDelete totally useless tests
Raphael von der Grün [Mon, 3 Sep 2018 20:00:14 +0000 (22:00 +0200)] 
Delete totally useless tests

4 years agoFix eslint warning 674/head
Raphael von der Grün [Tue, 4 Sep 2018 21:22:32 +0000 (23:22 +0200)] 
Fix eslint warning

4 years agoSimplify spying for install events
Raphael von der Grün [Tue, 4 Sep 2018 21:16:00 +0000 (23:16 +0200)] 
Simplify spying for install events

4 years agoFix expected-rejection promise handling
Raphael von der Grün [Tue, 4 Sep 2018 20:54:00 +0000 (22:54 +0200)] 
Fix expected-rejection promise handling

4 years agoUse arrow functions
Raphael von der Grün [Tue, 4 Sep 2018 20:46:03 +0000 (22:46 +0200)] 
Use arrow functions

4 years agoUse class
Raphael von der Grün [Tue, 4 Sep 2018 20:57:05 +0000 (22:57 +0200)] 
Use class

4 years agoUse const & let
Raphael von der Grün [Mon, 3 Sep 2018 23:11:18 +0000 (01:11 +0200)] 
Use const & let

4 years agoMove setup code to beforeAll
Raphael von der Grün [Mon, 3 Sep 2018 23:09:15 +0000 (01:09 +0200)] 
Move setup code to beforeAll

4 years agoDo cleanup in afterAll
Raphael von der Grün [Mon, 3 Sep 2018 22:53:01 +0000 (00:53 +0200)] 
Do cleanup in afterAll

4 years agoSimplify getting paths to test plugins
Raphael von der Grün [Mon, 3 Sep 2018 22:23:23 +0000 (00:23 +0200)] 
Simplify getting paths to test plugins

4 years agoSimplify collecting `results` events
Raphael von der Grün [Tue, 4 Sep 2018 20:34:27 +0000 (22:34 +0200)] 
Simplify collecting `results` events

4 years agoCosmetic changes
Raphael von der Grün [Tue, 4 Sep 2018 20:33:23 +0000 (22:33 +0200)] 
Cosmetic changes

4 years agoRemove unnecessary test setup
Raphael von der Grün [Tue, 4 Sep 2018 20:31:39 +0000 (22:31 +0200)] 
Remove unnecessary test setup

4 years agoOrganize imports
Raphael von der Grün [Mon, 3 Sep 2018 21:03:52 +0000 (23:03 +0200)] 
Organize imports

4 years agoBetter failure messages 672/head
Raphael von der Grün [Tue, 28 Aug 2018 22:33:14 +0000 (00:33 +0200)] 
Better failure messages

4 years agoRevert to default test timeouts
Raphael von der Grün [Wed, 29 Aug 2018 00:19:16 +0000 (02:19 +0200)] 
Revert to default test timeouts

4 years agoRefresh project setup before each test
Raphael von der Grün [Wed, 29 Aug 2018 00:07:26 +0000 (02:07 +0200)] 
Refresh project setup before each test

4 years agoReduce constant scope
Raphael von der Grün [Tue, 28 Aug 2018 23:28:15 +0000 (01:28 +0200)] 
Reduce constant scope

4 years agoMove setup to beforeAll
Raphael von der Grün [Tue, 28 Aug 2018 23:22:44 +0000 (01:22 +0200)] 
Move setup to beforeAll

4 years agoRemove questionable parseElementtreeSync fake
Raphael von der Grün [Tue, 28 Aug 2018 23:11:23 +0000 (01:11 +0200)] 
Remove questionable parseElementtreeSync fake

4 years agoFactor out common setup
Raphael von der Grün [Tue, 28 Aug 2018 22:51:39 +0000 (00:51 +0200)] 
Factor out common setup

4 years agoMove teardown logic to afterAll
Raphael von der Grün [Tue, 28 Aug 2018 22:46:34 +0000 (00:46 +0200)] 
Move teardown logic to afterAll

4 years agoWrap everything in common describe block
Raphael von der Grün [Tue, 28 Aug 2018 22:33:14 +0000 (00:33 +0200)] 
Wrap everything in common describe block

4 years agoUse const where possible
Raphael von der Grün [Tue, 28 Aug 2018 22:31:08 +0000 (00:31 +0200)] 
Use const where possible

4 years agoOrganize imports
Raphael von der Grün [Tue, 28 Aug 2018 22:28:21 +0000 (00:28 +0200)] 
Organize imports

4 years agoRemove unused functionality
Raphael von der Grün [Tue, 28 Aug 2018 21:20:21 +0000 (23:20 +0200)] 
Remove unused functionality

4 years ago Merge pull request #613 from dpogue/fs-extra
Raphael von der Grün [Tue, 4 Sep 2018 18:40:58 +0000 (20:40 +0200)] 
 Merge pull request #613 from dpogue/fs-extra

 CB-14140 Switch to using fs-extra in favour of shelljs

4 years agoRemove dependency on shelljs 613/head
Raphael von der Grün [Mon, 3 Sep 2018 18:25:50 +0000 (20:25 +0200)] 
Remove dependency on shelljs

4 years agoGet rid of shelljs in cordova/serve
Raphael von der Grün [Mon, 3 Sep 2018 18:24:21 +0000 (20:24 +0200)] 
Get rid of shelljs in cordova/serve

The shelljs usage in the cordova/serve spec is just commented out, since
it has been disabled for some time and is due to be replaced anyway.

4 years agoDisable tests that were already broken
Raphael von der Grün [Tue, 28 Aug 2018 21:34:32 +0000 (23:34 +0200)] 
Disable tests that were already broken

These tests are broken beyond the scope of switching to fs-extra and
will be fixed separately.

4 years agoSwitch to using fs-extra in favour of shelljs
Darryl Pogue [Wed, 16 May 2018 06:19:45 +0000 (23:19 -0700)] 
Switch to using fs-extra in favour of shelljs

Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
4 years agoUpdate to fs-extra 7
Raphael von der Grün [Tue, 28 Aug 2018 18:29:04 +0000 (20:29 +0200)] 
Update to fs-extra 7

4 years agoMerge pull request #665 from raphinesse/focused-restore
Raphael von der Grün [Tue, 4 Sep 2018 18:18:56 +0000 (20:18 +0200)] 
Merge pull request #665 from raphinesse/focused-restore

Radically focused restore.spec finally fast and reliable

4 years agoMake pkgJson-restore.spec the unit test for cordova/restore-util 665/head
Raphael von der Grün [Tue, 4 Sep 2018 17:21:44 +0000 (19:21 +0200)] 
Make pkgJson-restore.spec the unit test for cordova/restore-util

- Fix comments and test names
- Simplify package.json restoration test
- Use arrow functions
- Use default timeout

4 years agoDon't depend on network in restore.spec (Speedup: 145)
Raphael von der Grün [Sun, 26 Aug 2018 15:41:41 +0000 (17:41 +0200)] 
Don't depend on network in restore.spec (Speedup: 145)

This changes the test subject in restore.spec from `cordova/prepare`
to `cordova/restore-util`. In doing so we can relatively easily stub
out the actual platform/plugin installation that made these tests so
unreliable but that we actually barely tested.

4 years agoOnly test `prepare` in restore.spec (Speedup: 1.75)
Raphael von der Grün [Sun, 26 Aug 2018 15:11:57 +0000 (17:11 +0200)] 
Only test `prepare` in restore.spec (Speedup: 1.75)

4 years agoRemove 'cordova plugin search' command (#671)
エリス [Thu, 30 Aug 2018 13:41:26 +0000 (22:41 +0900)] 
Remove 'cordova plugin search' command (#671)

- Remove cordova plugin search command
- Remove search command message
- Remove search command tests

4 years agoMerge pull request #670 from raphinesse/spec-fixes
Raphael von der Grün [Tue, 28 Aug 2018 14:29:33 +0000 (16:29 +0200)] 
Merge pull request #670 from raphinesse/spec-fixes

Various spec fixes and cleanup

4 years agoMerge pull request #666 from raphinesse/remove-more-stuff
Raphael von der Grün [Tue, 28 Aug 2018 14:28:31 +0000 (16:28 +0200)] 
Merge pull request #666 from raphinesse/remove-more-stuff

Remove unused and deprecated code

4 years agoRemove unused npm dependencies 666/head
Raphael von der Grün [Mon, 27 Aug 2018 00:45:35 +0000 (02:45 +0200)] 
Remove unused npm dependencies

4 years agoRemove unused plugman/util/search-and-replace
Raphael von der Grün [Mon, 27 Aug 2018 00:39:04 +0000 (02:39 +0200)] 
Remove unused plugman/util/search-and-replace

4 years agoRemove unused plugman/registry modules
Raphael von der Grün [Mon, 27 Aug 2018 00:39:03 +0000 (02:39 +0200)] 
Remove unused plugman/registry modules