Commit Graph

139 Commits

Author SHA1 Message Date
Dave Conway-Jones 4630a162af
Add msg.flush mode to delay node
to spew out contents rather than dump
(as per Trello item)
2018-09-23 17:31:11 +01:00
Nick O'Leary 18b5b4901f
Merge branch 'dev' into repackage 2018-08-31 21:18:23 +01:00
Nick O'Leary 0c5a76b391
Add env.get to Function node 2018-08-30 22:42:30 +01:00
Nick O'Leary 55d71659f8
Merge branch 'master' into repackage 2018-08-29 09:55:40 +01:00
Nick O'Leary f809377de8
Merge pull request #1854 from kazuhitoyokoi/master-fixtypointestcase4functionnode
Fix typo in test case
2018-08-28 21:19:48 +01:00
Nick O'Leary 38a1291c5b
Fixup all the tests 2018-08-20 16:17:24 +01:00
Nick O'Leary f169a68319
Fix template node handling of nested context tags 2018-08-14 16:21:38 +01:00
Kazuhito Yokoi 695873d35a Fix typo in test case for function node 2018-08-06 21:14:53 +09:00
HirokiUchikawa 6533a9793c Allow `get` and `keys` to be called without callback 2018-07-27 21:33:38 +09:00
Nick O'Leary 4e549dd426
Add function tests for multiple-set access to context 2018-07-26 21:15:32 +01:00
Nick O'Leary ba1a67969b
Merge pull request #1825 from node-red-hitachi/add-types-to-trigger-node
Add support of bin, data, and env type to trigger node
2018-07-20 11:45:17 +01:00
Hiroyasu Nishiyama b9733e3dfa add support of bin, data, and env to trigger node 2018-07-19 21:20:02 +09:00
Hiroyasu Nishiyama 5847f92bef fix test for template node for persistable context 2018-07-19 11:06:57 +09:00
Nick O'Leary 8663ec6880
Merge pull request #1817 from node-red-hitachi/0.19-add-test-cases-for-inject-node
Add test cases for inject node
2018-07-18 11:35:51 +01:00
Hiroyasu Nishiyama ee74ed9ce9 add test cases for inject node 2018-07-18 18:13:07 +09:00
Hiroyasu Nishiyama cae7949a48 add persistable context tests for function node 2018-07-18 16:43:12 +09:00
Nick O'Leary 46acc62279
Make Trigger node timeout test 1ms more tolerable 2018-07-15 21:13:02 +01:00
Nick O'Leary 7fca04404e
Fix debug test for _enc_ change 2018-07-14 23:18:55 +01:00
Nick O'Leary 5b76c91004
Merge pull request #1806 from node-red-hitachi/0.19-template-node-for-persistable-context
Add support of persistable context to template node
2018-07-14 22:40:50 +01:00
Nick O'Leary 5a0a7b907b
Merge pull request #1809 from node-red-hitachi/0.19-fix-tests-for-trigger-node
Add multiple persistable store tests for trigger node
2018-07-14 22:39:05 +01:00
Hiroyasu Nishiyama 91992b48c1 add multiple persistable store tests 2018-07-14 12:15:26 +09:00
Hiroyasu Nishiyama c9a335a6f9 add multiple persistable store tests 2018-07-14 11:50:49 +09:00
Hiroyasu Nishiyama c72961a52a add support of persistable context to template node 2018-07-14 00:11:59 +09:00
Kazuhito Yokoi 761161a8e5 Fix async problem in test cases 2018-07-13 17:34:04 +09:00
Kazuhito Yokoi 590506e306 Add test cases of persistable context for trigger node 2018-07-13 15:26:07 +09:00
Kazuhito Yokoi d53ced7830 Add test cases of persistable context for inject node 2018-07-12 16:26:16 +09:00
Nick O'Leary d7adff9a65
Add async message handling to Trigger node 2018-07-09 14:12:44 +01:00
Nick O'Leary 0ff0f25aaf
Merge branch 'master' into 0.19 2018-05-25 13:58:15 +01:00
Nick O'Leary 252df81f59
Pass Date into the Function node sandbox to fix instanceof tests 2018-05-25 10:55:44 +01:00
Dave Conway-Jones 3df3d6f516
add debug to trigger test to help work out fails 2018-05-24 10:02:51 +01:00
Hiroyasu Nishiyama af1ea610ea allow id and name reference in function node code (#1731) 2018-05-21 11:34:56 +01:00
Nick O'Leary 3b5a2815a9
Merge master 2018-05-08 23:27:27 +01:00
Nick O'Leary 98546b6e6a
Fixup Function node error line reporting 2018-05-08 11:40:16 +01:00
Nick O'Leary ae4b1b17a9
Increase trigger node test timings 2018-05-01 12:59:53 +01:00
Christopher Hiller e1195ac00a fix many test problems (#1677)
* 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>
2018-04-23 12:37:26 +01:00
Nick O'Leary f31f23ff07
Allow template node to be updated more than once
Fixes #1671
2018-03-27 10:14:39 +01:00
Dave Conway-Jones 087cd121b8 add debug and trace to function node (#1654) 2018-03-20 20:40:36 +00:00
Dave Conway-Jones 7e416797e9
make trigger test a bit more robust 2018-03-19 17:33:18 +00:00
mblackstock 10d8ca30b0 use node-red-node-test-helper for node tests 2018-03-01 20:41:16 -08:00
Dave Conway-Jones 4ebb5d099e
add trigger reset test for null on 2nd output 2018-03-01 14:00:14 +00:00
Dave Conway-Jones 9bc72c1a06 let trigger node be reset by boolean message (#1554)
* let trigger node be reset by boolean message

with test

* fix trigger node boolean reset check to work with false

and add test
2018-01-17 09:51:53 +00:00
Dave Conway-Jones 7b1787fdbb Debug to status option (#1499)
* 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
2018-01-13 16:14:03 +00:00
Klaus Landsdorf 4ff6e792cd Inject node - let once delay be editable (#1541)
* inject once with delay

* test for inject delay at once works

* give access to the once delay of the inject node

* change event not needed in HTML

* code review with Dave

* rename test

* tests for default and optional delay

* test once with delay and repeat
2018-01-11 21:50:53 +00:00
Dave Conway-Jones f737ea96f3
Don't send message if it doesn't exist. and give it time not to exist.
to close #1527
2017-12-19 17:54:26 +00:00
Ross Cruickshank f21c8154ed enable template config via msg.template for stored or generated templates (#1503)
* updates to 80-template to allow setting template with msg.template

* updated 80-template_spec test for msg.template support

* fixed 80-template.js test
2017-12-05 12:24:06 +00:00
Nick O'Leary 64191e8303
Merge master to 0.18 2017-12-03 22:32:28 +00:00
Dave Conway-Jones cc88ebd2b9 Let trigger node support per topic mode (#1398)
* Let trigger node support per topic mode

* ensure trigger node clones repeating message

* Add some tests for trigger by topic

* test trigger repeat for pass by ref error

* trigger test - add missing try/catch to all test with callback

* boost trigger node test coverage
2017-11-17 17:35:18 +00:00
Jim Turner 6baedf909d Fix #1478 - Project files are not being flushed to disk after being written (#1479)
* 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.
2017-11-17 17:29:33 +00:00
Dave Conway-Jones 2b9aa94f3a Add rc property to exec node outputs 1 and 2 (#1401)
* Add rc property to exec node outputs 1 and 2

to close #1399

* improve test coverage and add tests for new msg.rc

* make spawn test slightly more robust to different environments

* added debug for spawn test

* let spawn error test be even more relaxed

* don't necessarily clone msg.payload in exec node stderr

as per suggestion
2017-11-02 16:55:44 +00:00
Hiroyasu Nishiyama 8f2f7ea1a5 Add test script for link node (#1463)
* fixed unmatched HTML tags

* add test for link node & red.js fix for it
2017-11-02 16:47:12 +00:00