{"id":557,"date":"2010-08-13T09:03:49","date_gmt":"2010-08-13T17:03:49","guid":{"rendered":"http:\/\/www.visophyte.org\/blog\/?p=557"},"modified":"2010-08-13T09:03:49","modified_gmt":"2010-08-13T17:03:49","slug":"test-case-mode-support-for-jetpack-unit-tests-in-emacs","status":"publish","type":"post","link":"https:\/\/www.visophyte.org\/blog\/2010\/08\/13\/test-case-mode-support-for-jetpack-unit-tests-in-emacs\/","title":{"rendered":"test-case-mode support for jetpack unit tests in emacs"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-558\" title=\"jetpack-test-case-mode\" src=\"http:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2010\/08\/jetpack-test-case-mode.png\" alt=\"\" width=\"521\" height=\"221\" srcset=\"https:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2010\/08\/jetpack-test-case-mode.png 521w, https:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2010\/08\/jetpack-test-case-mode-300x127.png 300w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><\/p>\n<p>Use Jetpack?\u00a0 Occasionally write unit tests so you won&#8217;t be a complete hypocrite when criticizing other people&#8217;s code?\u00a0 Think that picture up above looks more useful than this?:<\/p>\n<pre>error: fail: list contents (\"4,5,6,7\" != \"3,4,5,6,7\")\r\ninfo: Traceback (most recent call last):\r\n  File \"resource:\/\/wmsy-jetpack-core-lib\/timer.js\", line 57, in notify\r\n    this._callback.apply(null, []);\r\n  File \"resource:\/\/wmsy-jetpack-core-lib\/unit-test.js\", line 257, in anonymous\r\n    timer.setTimeout(function() { onDone(self); }, 0);\r\n  File \"resource:\/\/wmsy-jetpack-core-lib\/unit-test.js\", line 282, in runNextTest\r\n    self.start({test: test, onDone: runNextTest});\r\n  File \"resource:\/\/wmsy-jetpack-core-lib\/unit-test.js\", line 300, in start\r\n    this.test.testFunction(this);\r\n  File \"resource:\/\/wmsy-jetpack-core-lib\/unit-test.js\", line 57, in runTest\r\n    test(runner);\r\n  File \"resource:\/\/wmsy-wmsy-tests\/test-vs-static.js\", line 37, in anonymous\r\n    slice.seek(6, 2, 2);\r\n  File \"resource:\/\/wmsy-wmsy-lib\/wmsy\/viewslice-static.js\", line 51, in anonymous\r\n    this._list.slice(this.bufLow, this.bufHigh));\r\n  File \"resource:\/\/wmsy-wmsy-tests\/test-vs-static.js\", line 31, in anonymous\r\n    \"list contents\");\r\n  File \"resource:\/\/wmsy-jetpack-core-lib\/unit-test.js\", line 229, in assertEqual\r\n    this.fail(message);\r\n  File \"resource:\/\/wmsy-jetpack-core-lib\/unit-test.js\", line 147, in fail\r\n    console.trace();\r\n<\/pre>\n<p>Then do I have an .el for you!\u00a0 <a href=\"http:\/\/hg.mozilla.org\/users\/bugmail_asutherland.org\/tb-test-help\/raw-file\/5123bcb60766\/jetpack-test-case-support.el\">This<\/a> lives <a href=\"http:\/\/hg.mozilla.org\/users\/bugmail_asutherland.org\/tb-test-help\/\">here<\/a>.\u00a0 You mileage may vary and may involve things catching on fire which can, in turn, affect your mileage.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use Jetpack?\u00a0 Occasionally write unit tests so you won&#8217;t be a complete hypocrite when criticizing other people&#8217;s code?\u00a0 Think that picture up above looks more useful than this?: error: fail: list contents (&#8220;4,5,6,7&#8221; != &#8220;3,4,5,6,7&#8221;) info: Traceback (most recent call &hellip; <a href=\"https:\/\/www.visophyte.org\/blog\/2010\/08\/13\/test-case-mode-support-for-jetpack-unit-tests-in-emacs\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[79,67,88],"class_list":["post-557","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-emacs","tag-jetpack","tag-test-case-mode"],"_links":{"self":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts\/557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/comments?post=557"}],"version-history":[{"count":3,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts\/557\/revisions"}],"predecessor-version":[{"id":561,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts\/557\/revisions\/561"}],"wp:attachment":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/media?parent=557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/categories?post=557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/tags?post=557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}