Last active
August 27, 2019 11:14
-
-
Save matshou/75d8ade50021f3a1178025b496f4c8dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const murphy = require("murphytest"); | |
| //ADJUST THE PATH TO FIND THE FILES RELATIVE TO YOUR CURRENT DIRECTORY | |
| eval(murphy.load(__dirname,"../../../apps/trellinator/ExecutionQueue.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator/Trellinator.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator/Trigger.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator/TrigTest.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/Board.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/Card.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/Attachment.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/CheckItem.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/Checklist.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/Comment.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/CustomField.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/Exceptions.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/HttpApi.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/IterableCollection.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/Label.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/List.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/Member.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/Notification.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/Team.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/TestConnector.js")); | |
| eval(murphy.load(__dirname,"../../../apps/trellinator-libs/TrelloApi.js")); | |
| //INCLUDE ANY OTHER REQUIRED FILES HERE | |
| eval(murphy.load(__dirname,"../Sample.js")); | |
| eval(murphy.load(__dirname,"notifications/default.run.js/comment_on_card.js")); | |
| //SET SOME MOCKING VARIABLES | |
| TestConnector.test_base_dir = __dirname; | |
| TestConnector.use_sequencer = true;//where multiple URLs need to be cached depending on when they are called | |
| //this is configured by default but not turned on by default | |
| //because otherwise all previously existing tests would need to | |
| //be refixtured | |
| //the override_token needs to be set so that when others run your tests | |
| //the new Trellinator() method doesn't fetch their member | |
| //object instead of using your cached api fixtures | |
| //DO NOT INCLUDE YOUR API KEY HERE -- TOKEN ONLY!!! | |
| Trellinator.override_token = "96186dd6cc4d52a2105590ed3651c0947d7f79c01179678fc16001410be95e7e"; | |
| Trellinator.fake_now = new Date("2018-02-28T05:00:00.000Z"); | |
| /*OPTIONAL | |
| TestConnector.prefix = "actual"; | |
| ExecutionQueue.fake_push = function(name,params,signature,time) | |
| { | |
| } | |
| */ | |
| //TestConnector.nocache = true;//use this to test performance or do setup/teardown | |
| //ADD YOUR TEST FUNCTIONS HERE | |
| addedCommentToCard(comment_on_card); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function addedCommentToCard(notification) | |
| { | |
| var notif = new Notification(notification); | |
| var members = notif.mentionedMembers(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| child_process.js:669 | |
| throw err; | |
| ^ | |
| Error: Command failed: curl --request GET --url 'https://api.trello.com/1/boards/5d6445da6e1af0201ec55b26/members?fields=fullName,username&key=cb86334730b2c5a3a63bc297d85a275e&token=96186dd6cc4d52a2105590ed3651c0947d7f79c01179678fc16001410be95e7e' | |
| at checkExecSyncError (child_process.js:629:11) | |
| at Object.execSync (child_process.js:666:13) | |
| at TestConnector.fetch (eval at <anonymous> (C:\Users\Yooks\Documents\GitHub\gerty-trello\boards\sample_board\Sample.js.murphy\default.run.js:22:1), <anonym ous>:87:29) | |
| at Function.HttpApi.call (eval at <anonymous> (C:\Users\Yooks\Documents\GitHub\gerty-trello\boards\sample_board\Sample.js.murphy\default.run.js:15:1), <anon ymous>:89:24) | |
| at Function.TrelloApi.get (eval at <anonymous> (C:\Users\Yooks\Documents\GitHub\gerty-trello\boards\sample_board\Sample.js.murphy\default.run.js:23:1), <ano nymous>:80:20) | |
| at Board.members (eval at <anonymous> (C:\Users\Yooks\Documents\GitHub\gerty-trello\boards\sample_board\Sample.js.murphy\default.run.js:7:1), <anonymous>:24 1:66) | |
| at Notification.membersMentionedInComment (eval at <anonymous> (C:\Users\Yooks\Documents\GitHub\gerty-trello\boards\sample_board\Sample.js.murphy\default.ru n.js:20:1), <anonymous>:1215:22) | |
| at Notification.mentionedMembers (eval at <anonymous> (C:\Users\Yooks\Documents\GitHub\gerty-trello\boards\sample_board\Sample.js.murphy\default.run.js:20:1 ), <anonymous>:659:21) | |
| at addedCommentToCard (eval at <anonymous> (C:\Users\Yooks\Documents\GitHub\gerty-trello\boards\sample_board\Sample.js.murphy\default.run.js:25:1), <anonymo us>:4:23) | |
| at Object.<anonymous> (C:\Users\Yooks\Documents\GitHub\gerty-trello\boards\s ample_board\Sample.js.murphy\default.run.js:49:1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| child_process.js:669 | |
| throw err; | |
| ^ | |
| Error: Command failed: curl --request GET --url 'https://api.trello.com/1/boards | |
| /5d6445da6e1af0201ec55b26/members?fields=fullName,username&key=cb86334730b2c5a3a | |
| 63bc297d85a275e&token=96186dd6cc4d52a2105590ed3651c0947d7f79c01179678fc16001410b | |
| e95e7e' | |
| at checkExecSyncError (child_process.js:629:11) | |
| at Object.execSync (child_process.js:666:13) | |
| at TestConnector.fetch (eval at <anonymous> (C:\Users\Yooks\Documents\GitHub | |
| \gerty-trello\boards\sample_board\Sample.js.murphy\default.run.js:22:1), <anonym | |
| ous>:87:29) | |
| at Function.HttpApi.call (eval at <anonymous> (C:\Users\Yooks\Documents\GitH | |
| ub\gerty-trello\boards\sample_board\Sample.js.murphy\default.run.js:15:1), <anon | |
| ymous>:89:24) | |
| at Function.TrelloApi.get (eval at <anonymous> (C:\Users\Yooks\Documents\Git | |
| Hub\gerty-trello\boards\sample_board\Sample.js.murphy\default.run.js:23:1), <ano | |
| nymous>:80:20) | |
| at Board.members (eval at <anonymous> (C:\Users\Yooks\Documents\GitHub\gerty | |
| -trello\boards\sample_board\Sample.js.murphy\default.run.js:7:1), <anonymous>:24 | |
| 1:66) | |
| at Notification.membersMentionedInComment (eval at <anonymous> (C:\Users\Yoo | |
| ks\Documents\GitHub\gerty-trello\boards\sample_board\Sample.js.murphy\default.ru | |
| n.js:20:1), <anonymous>:1215:22) | |
| at Notification.mentionedMembers (eval at <anonymous> (C:\Users\Yooks\Docume | |
| nts\GitHub\gerty-trello\boards\sample_board\Sample.js.murphy\default.run.js:20:1 | |
| ), <anonymous>:659:21) | |
| at addedCommentToCard (eval at <anonymous> (C:\Users\Yooks\Documents\GitHub\ | |
| gerty-trello\boards\sample_board\Sample.js.murphy\default.run.js:25:1), <anonymo | |
| us>:4:23) | |
| at Object.<anonymous> (C:\Users\Yooks\Documents\GitHub\gerty-trello\boards\s | |
| ample_board\Sample.js.murphy\default.run.js:49:1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment