* fix many test problems
- adds [stoppable](https://npm.im/stoppable) to force-stop net & http
servers
- upgrades to latest mocha
- much cleanup of servers
- some removal of useless code
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
* increase wait time to hack at race condition
* PoC with fork of stoppable
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
* fix custom stoppable url for newer npm
* make travis go faster; attempt to avoid npm troubles
* fix coveralls executable path
* add extra time for flake to trigger spec
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
This commit allows an example from an npm package that has
an org scoped name (which includes an @ character) to be retrieved and
loaded properly through the flows endpoint.
* Let debug optionally target the status line (32 chars only)
* Add batching of messages to debug ws comms
* let Debug handle simple case of NaN
would also close#1530
* Fixup debug tests for batch comms (no new tests yet)
* mixup comms/api test to match new batch mode (no new tests)
* Add test for NaN being sent OK.
* redo original fix to padding / labels for new debug options
* fix debug test (re-add fix from #1444)
* Fix up merge issues in debug tests
* Call fsync() before closing file
* Fix race condition in tests due to incorrect stub.
The startFlows() function wasn't really being stubbed, so it was still being called. But there was no corresponding call to stopFlows().
In later tests, the check in Flows.init() was throwing the "Cannot init without a stop" error.
* Test coverage for fsync() calls
For issue #1478
* Revert "Fix race condition in tests due to incorrect stub."
This reverts commit 4f71d7851b.
* Fix race condition in tests due to incorrect stub.
The startFlows() function wasn't really being stubbed, so it was still being called. But there was no corresponding call to stopFlows().
In later tests, the check in Flows.init() was throwing the "Cannot init without a stop" error.
* Fix intermittent test failure in Exec node.
Occasionally, the error text on stderr will come in more than one piece. The test only worked correctly if a single message was received.
* Make theme able to load custom javascript
- Look for the field 'customScript' in editorTheme (settings.js)
- Add it to mustach context
- Load list on template side (index.mst)
* Add unit tests for customScripts
* Code review edits : generic behavior for theme.page.[css|scripts]
- Use the same way to share css and javascript files from a theme
- Allow string instead of array for theme.page.scripts
- Remove old customScript field
* Resolve dir argument of getLocalNodeFiles function
The getLocalNodeFiles is called 3 times. Each time it called, the callee needs to resolve the dir argument.
That was not done for several of calls, and local modules (specified in the "nodesDir" setting) were not returned to client because of that.
This fix will allow to make sure the dir is consistently resolved.
* Several changes in "localfilesystem_spec.js":
- Changed checkNodes to verify that every node's file property is resolved, i.e. containst absolute path, not relative.
- Added a unit-test "Finds nodes in settings.nodesDir (string,relative path)"
* Add the node setting tlsConfigDisableLocalFiles for tls node.
* Fix the bug that shows node setting when specified in settings.js and exportable is false.
* fix bug where savesettings did not honor local settings variables
* don't create lib/flows on read; It's already created in localfilesystem.init and in saveLibraryEntry -
so removed call to promiseDir, and added a return of [] if accessing a folder which did not exist.
This is important because else when settings.readOnly is true, it still creates folders.
* Fix a CI failure where path passed to getLibraryEntry is empty;
treat this case as meaning it was wanting a folder, and return empty if the folder dioes not exist
* Add a test for getLibraryEntry( type, '/' ) as called by node-red
* change newsettings to camelCase newSettings