1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
Commit Graph

1178 Commits

Author SHA1 Message Date
dceejay
234abd82a2 Move away from __defineGetter syntax, in red and server
Bump test coverage forwards a bit
2015-03-06 10:17:00 +00:00
Antoine Aflalo
0ed9f6cc4f Adding an Object node to the sandbox of a function node
Permit the user of the sandbox to log using the Function Node.
Test provided and working.

Fix Display warning message in the debug log
Before they were displayed as error instead of warning
2015-03-05 09:50:11 +02:00
Nick O'Leary
34364f5627 Allow node to register multiple close handlers
Closes #573
2015-03-04 21:42:11 +00:00
Nick O'Leary
04f2c92ba6 Add subflow/catch node tests 2015-02-26 22:40:54 +00:00
Nick O'Leary
00d0f8cfc7 Invoke catch node only when msg is provided 2015-02-26 22:40:54 +00:00
Nick O'Leary
c80a44933c Add errorHandler tests 2015-02-26 22:40:54 +00:00
Nick O'Leary
393fc349b9 Fix saving for node-library content 2015-02-26 17:08:20 +00:00
Nick O'Leary
b6245bdef7 Remove console.log from XML test spec 2015-02-25 14:25:37 +00:00
Nick O'Leary
ce1cd1ab9c Change default data dir
Changes the default location for user data to $HOME/.node-red.
2015-02-25 14:25:01 +00:00
dceejay
2e76541fa5 Update Debug node test to "unbreak" build... oops 2015-02-10 17:31:26 +00:00
Nick O'Leary
8451c29a25 Add line/col report test 2015-02-07 19:56:22 +00:00
Nick O'Leary
8eb1a02407 Fix unit test failures following mocha upgrade 2015-02-06 17:27:43 +00:00
Nick O'Leary
3849855b57 Rename _id to _msgid to avoid mongo clash 2015-02-06 16:36:32 +00:00
Nick O'Leary
c31ffb98b0 Tie auth middleware to needsPermission api 2015-02-05 23:43:35 +00:00
Nick O'Leary
53a515176b Remove unused token expiry code 2015-02-05 13:01:00 +00:00
Nick O'Leary
fbf7ee50eb Increase unit test coverage of auth code 2015-02-05 13:00:56 +00:00
Nick O'Leary
a494954275 Add permissions and user menu 2015-02-05 13:00:55 +00:00
Nick O'Leary
f3eb85c449 Move over to settings.adminAuth 2015-02-05 13:00:54 +00:00
Nick O'Leary
2128b57ab2 Add oauth grant 2015-02-05 13:00:07 +00:00
Nick O'Leary
482c4e9c5e Add memory metric reporting 2015-02-04 22:28:17 +00:00
Nick O'Leary
1712146836 Clear loghandlers on init and supress output in tests 2015-02-04 21:29:11 +00:00
Nick O'Leary
8443e48240 Place flows backup alongside flow file
Also backup credentials file in the same manner.
2015-02-04 15:23:28 +00:00
Nick O'Leary
0aaea1ec40 Update logging/metric system 2015-02-03 22:02:26 +00:00
hbeeken
7d6ce1ec12 Changing metric logging to take a primative rather than an object 2015-02-03 19:12:09 +00:00
hbeeken
b052324d36 Adding logging & metric recording configuration via settings 2015-02-03 19:12:09 +00:00
hbeeken
a87548a991 Fixing test where part wasn't exercised 2015-02-02 13:21:19 +00:00
Nick O'Leary
f983e4da9f Renable unit tests following logging api changes 2015-01-29 09:57:09 +00:00
hbeeken
0bfbb12211 Adding metric logging mechanism 2015-01-27 14:41:20 +00:00
dansu
68e51bb886 added tests for websocket-client
cleanup and prettify
2015-01-18 09:38:47 +00:00
Nick O'Leary
8d5f99640e Merge pull request #533 from knolleary/deploy
Add smarter deployment options
2015-01-16 16:00:35 +00:00
Nick O'Leary
ffe417976c Merge pull request #532 from hindessm/random-delay-fixes
Random delay fixes
2015-01-16 15:46:53 +00:00
Nick O'Leary
d04ac00732 Add more Flow_spec tests 2015-01-16 15:43:47 +00:00
Nick O'Leary
c97ab18e62 Add Flow spec 2015-01-15 17:12:50 +00:00
Nick O'Leary
a5afc258b1 Update unit tests 2015-01-15 10:28:11 +00:00
Mark Hindess
7909ca24d3 Fix random delay in milliseconds case and change test to reproduce bug.
Because there was no multiplier the node.randomFirst was a string so
the later '+' was a concatentation. The test failed to catch this because
it uses integers not strings to configure the node.
2015-01-14 10:18:47 +00:00
dansu
2577631334 Added unittests for websocket node 2015-01-13 10:38:53 +01:00
Anna Thomas
03765afefa Updated nodes_spec test to no-op when already enabled/disabled by type name 2014-12-17 13:58:49 +00:00
Anna Thomas
10681f97d9 Updated tests to reflect addition of version getSet 2014-12-08 16:53:06 +00:00
Anna Thomas
81e08e06e4 Updated test to reflect saving settings in nodes 2014-12-08 10:10:16 +00:00
Anna Thomas
8b6e287a74 Updated remove modules tests to reflect getNodeModuleInfo changes 2014-12-05 16:51:26 +00:00
Anna Thomas
35b3912808 Removed CLI from repo 2014-11-28 09:21:39 +00:00
Anna Thomas
57bc83b2a7 Enabling and disabling non-existent nodes throws an error 2014-11-27 16:42:45 +00:00
Anna Thomas
bb6e27f662 Store node list as module list 2014-11-26 16:25:37 +00:00
Anna Thomas
d7f249eac4 Added version number to modules 2014-11-21 16:35:29 +00:00
Anna Thomas
dd5821ee1b Installing a module returns module info
Removing a module checks module exists and checks type is not in use
2014-11-21 15:15:24 +00:00
Anna Thomas
4c9d53388c Removed plugins references 2014-11-21 11:31:07 +00:00
Anna Thomas
70f101497d Replaced delete response with 204 2014-11-21 11:25:51 +00:00
Anna Thomas
56cb985de9 Separated put response into /nodes/:mod and /nodes/:mod/:set
Updated put tests
2014-11-21 10:36:32 +00:00
Anna Thomas
d614b7c39f Moved get node set response to /nodes/:mod/:set
Updated tests
Changed plugin back to module
2014-11-20 15:18:16 +00:00
Anna Thomas
0ff65f6805 Updated registry tests to reflect id changes 2014-11-20 13:08:27 +00:00
Nick O'Leary
71bd5cd9e9 Merge pull request #485 from anna2130/nr-cli-enhancements
WIP: Command Line Tool API
2014-11-17 13:34:24 +00:00
Anna Thomas
8d16f3c8be Registry tests for plugins and enable/disable in CLI 2014-11-13 15:14:20 +00:00
Nick O'Leary
3e235ecc0b Move cloneMessage to RED.util.cloneMessage 2014-11-06 11:39:30 +00:00
Anna Thomas
2e7a97fb88 Get plugins tests 2014-11-06 10:59:06 +00:00
Nick O'Leary
266a644ca6 Preserve querystring when ensuring path ends with slash 2014-11-06 00:01:01 +00:00
Nick O'Leary
a520240b25 Ensure application/json on library flows reqs 2014-11-05 23:08:23 +00:00
Nick O'Leary
e7eb02fcb7 Add unit tests for refactored API modules 2014-11-05 23:07:50 +00:00
Nick O'Leary
f0e9a0279f Ignore comms heartbeat messages in comms test 2014-10-31 13:06:08 +00:00
Nick O'Leary
6169e4299a Add initial subflow tests 2014-10-29 21:44:33 +00:00
Anna Thomas
ce6513e7f7 Change node can set msg property to another msg property. Closes #456 2014-10-28 15:50:50 +00:00
Nick O'Leary
fe95a98339 Merge pull request #441 from anna2130/reduce-message-cloning-overhead
Reduces message cloning overhead for single recipients
2014-10-22 15:09:59 +01:00
hbeeken
1e7ce2cfe7 Adding capability to the test helper to load more than one node at once 2014-10-22 11:29:54 +01:00
Anna Thomas
bc8e459ae6 Node does not clone first message sent
Tests updated to mirror this behaviour
    Annotated algorithm
2014-10-21 14:08:35 +01:00
Nick O'Leary
53a9a5fe93 Merge pull request #422 from anna2130/debug
Updated debug node to output other msg properties
2014-10-20 16:35:24 +01:00
Nick O'Leary
bec4e429f9 Merge pull request #433 from anna2130/change-node-multi-level-properties
Change node: Multi-level properties
2014-10-20 11:12:59 +01:00
Anna Thomas
986ce8163f Added tests to check functionality when using multi-level properties 2014-10-07 16:12:35 +01:00
Anna Thomas
2a753c9d22 Updated debug node test 2014-10-07 10:25:56 +01:00
Nick O'Leary
489c552dbe Reset settings between tests 2014-10-03 15:05:37 +01:00
Nick O'Leary
86d4179039 Merge pull request #421 from hindessm/fix-supertest-usage
Fix supertest usage to correctly throw errors.
2014-10-01 22:48:00 +01:00
Mark Hindess
ea6313c9a1 Make nock an optional dependency. 2014-10-01 18:14:40 +01:00
Mark Hindess
8df9eee6d2 Add nock to node test helper. 2014-10-01 14:35:51 +01:00
Mark Hindess
669f3d9ba1 Fix supertest usage to correctly throw errors. 2014-09-30 14:59:37 +01:00
Mark Hindess
059ec3b50c Add credentials support to node test helper. 2014-09-30 08:01:40 +01:00
Nick O'Leary
9152daa13b Fix race condition on saving config 2014-09-23 17:09:23 +01:00
Nick O'Leary
723a3e628e Add cli tests 2014-09-23 00:14:30 +01:00
Nick O'Leary
af0b740fbd Rework nr-cli
- better componentisation
- add 'search' option to look for npm modules
- add 'target' option to point at non-default installs
2014-09-22 22:59:42 +01:00
Nick O'Leary
55c830b812 Add disableEditor option
Closes #409
2014-09-22 14:34:17 +01:00
Nick O'Leary
c98b9dfaa3 Don't filter errored nodes in result list 2014-09-20 22:42:48 +01:00
Nick O'Leary
da61fe12d0 Add dynamic node api
Closes #322
- nodes modules can be installed/removed dynamically at runtime
- nodes can be enabled/disabled
- onpaletteadd/onpaletteremove api added to node definitions
- initial implementation of nr-cli
2014-09-17 23:57:29 +01:00
Nick O'Leary
00cb8d5bce Update package dependencies
Closes #345

Also fixes a resulting test failure with the HTML parse node
2014-09-17 23:49:28 +01:00
Mark Hindess
c0fcc20f23 Add ensureBuffer helper for nodes. 2014-09-10 12:46:56 +01:00
Anna Thomas
54a2923c65 Fixed _spec.js test 2014-09-10 09:48:27 +01:00
zobalogh
4706b814dd Adding drop check to Delay tests 2014-09-08 14:26:35 +01:00
Nick O'Leary
c91a3f3f78 Delay node drop immediate not working
Fixes #381
2014-09-05 16:04:35 +01:00
Mark Hindess
0a009e2a15 Rename RED.utils to RED.util. Fixes #364. 2014-09-03 13:20:45 +01:00
Nick O'Leary
0138eb3f5f Merge pull request #343 from zobalogh/range-tests
Adding range tests
2014-09-01 10:23:55 +01:00
Nick O'Leary
9876570189 Merge delay node test
Fixes #346
Closes #347
2014-09-01 10:22:29 +01:00
Mark Hindess
a9e72858df Add ensure string helper for nodes. 2014-08-28 14:25:41 +01:00
Nick O'Leary
8febfbe329 Disable tail truncated test until it behaves on Travis 2014-08-28 00:22:12 +01:00
Nick O'Leary
bac288fa52 Add more delays to tail node test 2014-08-28 00:14:25 +01:00
Nick O'Leary
691ef12e04 Add more tail node tests
- add 'file doesn't exist initially' text
- remove resource file as it is programmatically modified by the test
- tweak test checking in truncated file test
2014-08-27 23:29:26 +01:00
Dave C-J
2d92b44f52 Tidy up tail node tests 2014-08-27 10:41:25 +01:00
Dave C-J
6b04d512ae add consistent timeouts to tail file write tests 2014-08-27 10:08:44 +01:00
Dave C-J
df751be331 Make all tail node test writres are sync 2014-08-27 09:51:30 +01:00
Dave C-J
ecbf4add6b Modify Tail node to only send new messages
Now with test that works with it.
Part of Issue #326
Now need to redo with libs that support windows.
2014-08-22 12:44:55 +01:00
zobalogh
3823150e46 Adding range node tests 2014-08-19 11:45:17 +01:00
Nick O'Leary
7042d87444 Handle missing file/modules in Add node api 2014-08-18 21:59:19 +01:00
Nick O'Leary
e8c4caaf74 Remove cheerio parse of node html files on start-up 2014-08-18 14:34:47 +01:00
Nick O'Leary
3c31ef4643 Merge pull request #336 from zobalogh/switch-test
Adding Switch Node tests
2014-08-18 11:15:04 +01:00
zobalogh
89825dae04 Adding Change Node tests 2014-08-15 12:19:07 +01:00
zobalogh
ce4d44ea48 Adding Switch Node tests 2014-08-14 11:27:21 +01:00
Nick O'Leary
58c2f5dd3d Add remove node api 2014-08-07 22:20:06 +01:00
Nick O'Leary
43ad8706aa Update tail node tests to use resource file 2014-08-07 14:55:34 +01:00
Nick O'Leary
15494dda84 Merge pull request #332 from zobalogh/tail-done-fix
Fixing test termination
2014-08-07 13:34:46 +01:00
Nick O'Leary
c6a98da256 Merge pull request #331 from hbeeken/issue-326
Proposed fix for Issue #326
2014-08-07 13:33:57 +01:00
Nick O'Leary
2e2b5ad13e Merge pull request #327 from hbeeken/html-node-tests
Tests for HTML node
2014-08-07 13:30:13 +01:00
zobalogh
ea22ffa2bf Fixing test termination 2014-08-07 13:23:20 +01:00
hbeeken
fadd2167f5 Closing file handles to fix test failures on windows 2014-08-07 12:03:03 +01:00
hbeeken
82fb15896c Tests for HTML node 2014-08-06 11:34:30 +01:00
Nick O'Leary
960d15491d Add node add/remove/enable/disable apis to registry 2014-08-04 17:12:54 +01:00
Nick O'Leary
495dd3f2e0 Merge pull request #325 from hbeeken/fix-registry-tests-for-windows
Using path.sep rather than "/" so tests run on windows as well as linux
2014-08-04 11:35:32 +01:00
hbeeken
8c0c843367 Using path.sep rather than "/" so tests run on windows as well as linux 2014-08-04 11:27:26 +01:00
hbeeken
118c50ce8e Fixing tests by clearing out the node registry between tests. 2014-08-04 10:59:08 +01:00
hbeeken
8eb8ac0f88 Adding tests for XML parser node 2014-08-04 10:56:49 +01:00
Nick O'Leary
f7f58a2347 Add registry test for node module loading 2014-08-03 21:17:24 +01:00
Nick O'Leary
1697aee9f6 Add loadNode api to registry.js 2014-08-01 23:42:01 +01:00
Nick O'Leary
3ee98e730d Ensure test resource icons directory exists 2014-08-01 22:23:32 +01:00
Nick O'Leary
d6c5f9b57f Add debug for eventEmitSpy
Debugging a travis-only build failure
2014-08-01 22:19:33 +01:00
Nick O'Leary
882b593ba4 Add missing registry test resources 2014-08-01 22:09:40 +01:00
Nick O'Leary
79e9641c09 Big rework of registry.js
Part of #322

Loads node.html files before node.js files

Adds helper.unload which must be called by node tests
to clear the registery of nodes
2014-08-01 22:05:49 +01:00
Nick O'Leary
8ee5be7031 Restore stubs in credentials_spec 2014-08-01 21:56:27 +01:00
Nick O'Leary
8e8e13a3a2 Add comms.stop to tidy up keepalive timer 2014-08-01 21:55:05 +01:00
zobalogh
716d0c1135 Adding tail node tests 2014-08-01 16:22:02 +01:00
Nick O'Leary
989f3459d5 Merge pull request #323 from zobalogh/further-registry-tests
Adding test for registry cheerio
2014-07-31 17:25:31 +01:00
Nick O'Leary
b8f40d4e39 Merge pull request #319 from hindessm/restrict-library-entry-names
Prohibit library entry names from containing '../'.
2014-07-31 17:24:57 +01:00
zobalogh
401afcbadd Adding test for registry cheerio 2014-07-31 16:49:19 +01:00
zobalogh
d9544e4ac5 Adding registry node load tests 2014-07-31 14:43:26 +01:00
Mark Hindess
b7428ab627 Prohibit library entry names from containing '../'. 2014-07-31 13:59:24 +01:00
hbeeken
5a714242a4 Remove duplicate require("util") 2014-07-31 13:53:11 +01:00
hbeeken
e179753853 Error path tests for 70-JSON.js 2014-07-31 11:02:55 +01:00
hbeeken
80676da300 Adding test for JSON node 2014-07-31 11:02:43 +01:00
Nick O'Leary
3e76e73839 Merge pull request #312 from hbeeken/test-credentials-registerEndpoint
Adding unit tests for credentials.registerEndpoint
2014-07-31 09:59:42 +01:00
hbeeken
9c0b65a4c2 Adding tests for credentials.registerEndpoint 2014-07-31 08:41:43 +01:00
Mark Hindess
a8c491bf2b Add comms keep alive tests. 2014-07-30 14:33:31 +01:00
Nick O'Leary
47f7cb52d8 Merge pull request #311 from hbeeken/test-credentials-extract
Adding unit tests for credentials.extract
2014-07-30 12:51:49 +01:00
hbeeken
a3cb0e996d Adding unit tests for credentials.extract 2014-07-30 10:56:42 +01:00
Mark Hindess
bbdfa03687 Test Node status method. 2014-07-30 10:39:48 +01:00
Mark Hindess
d7b3e86096 Test Node send for req/res behaviour. 2014-07-30 10:29:37 +01:00
Mark Hindess
53d9eab94e Add more tests for function node. 2014-07-30 09:32:17 +01:00
Nick O'Leary
b1f14031a9 Merge pull request #303 from hbeeken/test-registerType-with-credentials
Adding test for index.registerType with credentials defined
2014-07-29 23:56:52 +01:00
hbeeken
796810f460 Test to ensure credential definition is defined after index.registerType 2014-07-29 14:58:49 +01:00
Mark Hindess
74ae2eca3e Start adding tests for nodes. 2014-07-29 12:59:42 +01:00
Nick O'Leary
ac1e750f14 Merge pull request #304 from hbeeken/test-credentials
Add test for case if loading credentials from storage has an error
2014-07-29 11:24:18 +01:00
Nick O'Leary
31d72b2193 Merge pull request #305 from hbeeken/test-index-remove-redundant-test
Remove redundant "can be required without errors" test
2014-07-28 20:50:16 +01:00
hbeeken
d09c992ecc Remove redundant "can be required without errors" test 2014-07-28 20:24:01 +01:00
hbeeken
132dcdeb43 Add test for case if loading credentials from storage has an error 2014-07-28 14:29:35 +01:00
hbeeken
50b28842a4 Removing assumption that /tmp exists so test runs on Windows 2014-07-28 12:10:13 +01:00
Nick O'Leary
76a6730ef4 Merge pull request #289 from zobalogh/storage-interface-dev
Defining storage interface
2014-07-25 15:00:40 +01:00
zobalogh
d58788f721 Defining storage interface. 2014-07-25 14:44:15 +01:00
Nick O'Leary
af1bcf33c1 Merge pull request #297 from zobalogh/ui-caller-delivery
Adding UI unit tests
2014-07-24 16:26:45 +01:00
Nick O'Leary
7abda9bc52 Merge pull request #298 from hindessm/test-comms
Add comms tests
2014-07-24 15:29:06 +01:00
Mark Hindess
2c1da2d546 Add comms tests. 2014-07-24 14:47:45 +01:00
zobalogh
12a06cacce Adding UI unit tests 2014-07-24 14:35:01 +01:00
hbeeken
2e86a41944 Adding unit test for nodes/index.js 2014-07-24 09:41:47 +01:00
Mark Hindess
5b5b7d2be1 Add library tests 2014-07-23 21:38:57 +01:00
zobalogh
b29062a931 Add test that every source file has a test. 2014-07-23 11:40:46 +01:00
Mark Hindess
1414308179 Test that wires to non-existent nodes are ignored. 2014-07-21 09:26:48 +01:00
Mark Hindess
2778c38b55 Add trivial tests to make coverage figure more realistic. 2014-07-17 09:16:43 +01:00
Mark Hindess
67bd4f373f Move tests to match source hierarchy. 2014-07-17 09:16:43 +01:00
Mark Hindess
8cedf76b70 Add missing license header. 2014-07-17 08:08:24 +01:00
Antoine Aflalo
ac889e18d2 Correcting setFlow test
Because of the change made into the credentials, the saveCredentials needs to be defined for the setFLow to work
2014-07-16 13:25:43 +03:00
Nick O'Leary
b7a83383c9 Merge pull request #268 from hbeeken/test-coverage
Adding unit test for credentials.clean
2014-07-16 10:53:25 +01:00
hbeeken
1419a79933 Adding unit test for credentials.clean 2014-07-16 09:25:08 +01:00
Mark Hindess
8e32427109 Add setFlows test. 2014-07-14 22:00:09 +01:00
Mark Hindess
d4548deeb3 Add node flows tests. 2014-07-14 21:44:34 +01:00
Mark Hindess
74335990e3 Add test for the null message case. 2014-07-10 14:25:32 +01:00
Mark Hindess
0a7bd848c6 Add more Node tests. 2014-07-10 14:25:32 +01:00
Nick O'Leary
820ca4475d Add tests for async close 2014-05-14 21:46:07 +01:00
Nick O'Leary
7b0a1b2463 Fix flow backup for first run, add tests 2014-05-07 00:33:50 +01:00
Nick O'Leary
5afc5857c4 Fix localfilesystem_spec 2014-05-03 22:38:33 +01:00
Nick O'Leary
7eed375111 Split up nodes.js into components 2014-05-03 22:28:17 +01:00
Dave C-J
a9e07f8b78 Updated credentials storage so there is a .._cred.... file per flow.
Allows swapping flows more easily without having to re-enter credentials.
Thus also added *_cred* to .gitignore
2014-05-02 14:35:51 +01:00
Nick O'Leary
c1502663b4 Update node_registry_spec 2014-03-31 14:41:51 +01:00
Nick O'Leary
ea2c0da163 Make localfs test async aware 2014-03-31 14:37:38 +01:00
Nick O'Leary
1bdfd920cd Add debug to storage_localfilesystem test 2014-03-31 14:15:10 +01:00
Nicholas O'Leary
848a69dc26 Make storage.init return a promise to async initialisation
part of #62
2013-11-12 17:13:06 +00:00
Nicholas O'Leary
29734dd994 Add unit test for localfilestorage
Stage 2 of #62
2013-11-10 22:19:01 +00:00
Nicholas O'Leary
f80cbf729a Add some initial tests 2013-10-20 21:42:18 +01:00