[{"data":1,"prerenderedAt":2720},["ShallowReactive",2],{"navigation":3,"\u002Fblog\u002F2015-03-03-end-to-end-tests-with-intern":406,"\u002Fblog\u002F2015-03-03-end-to-end-tests-with-intern-surround":2709},[4,8,39,52,264,310,319,380,397],{"title":5,"path":6,"stem":7},"Notes","\u002Fnotes","1.notes\u002Findex",{"title":9,"path":10,"stem":11,"children":12,"page":30},"Architecture","\u002Fnotes\u002Farchitecture","1.notes\u002Farchitecture",[13,17,31,35],{"title":14,"path":15,"stem":16},"API Management","\u002Fnotes\u002Farchitecture\u002Fapi-management","1.notes\u002Farchitecture\u002Fapi-management",{"title":18,"path":19,"stem":20,"children":21,"page":30},"Data","\u002Fnotes\u002Farchitecture\u002Fdata","1.notes\u002Farchitecture\u002Fdata",[22,26],{"title":23,"path":24,"stem":25},"ERD","\u002Fnotes\u002Farchitecture\u002Fdata\u002Ferd","1.notes\u002Farchitecture\u002Fdata\u002Ferd",{"title":27,"path":28,"stem":29},"SCWD","\u002Fnotes\u002Farchitecture\u002Fdata\u002Fscwd","1.notes\u002Farchitecture\u002Fdata\u002Fscwd",false,{"title":32,"path":33,"stem":34},"Microservices","\u002Fnotes\u002Farchitecture\u002Fmicroservices","1.notes\u002Farchitecture\u002Fmicroservices",{"title":36,"path":37,"stem":38},"OAuth","\u002Fnotes\u002Farchitecture\u002Foauth","1.notes\u002Farchitecture\u002Foauth",{"title":40,"path":41,"stem":42,"children":43,"page":30},"Archive","\u002Fnotes\u002Farchive","1.notes\u002Farchive",[44,48],{"title":45,"path":46,"stem":47},"Google Web Toolkit","\u002Fnotes\u002Farchive\u002Fgwt","1.notes\u002Farchive\u002Fgwt",{"title":49,"path":50,"stem":51},"Jekyll","\u002Fnotes\u002Farchive\u002Fjekyll","1.notes\u002Farchive\u002Fjekyll",{"title":53,"path":54,"stem":55,"children":56,"page":30},"Development","\u002Fnotes\u002Fdevelopment","1.notes\u002Fdevelopment",[57,74,112,149,226,239,260],{"title":58,"icon":30,"path":59,"stem":60,"children":61,"page":30},"IDE","\u002Fnotes\u002Fdevelopment\u002Fide","1.notes\u002Fdevelopment\u002FIDE",[62,66,70],{"title":63,"path":64,"stem":65},"Jetbrains IDE","\u002Fnotes\u002Fdevelopment\u002Fide\u002Fjetbrains","1.notes\u002Fdevelopment\u002FIDE\u002Fjetbrains",{"title":67,"path":68,"stem":69},"NVIM","\u002Fnotes\u002Fdevelopment\u002Fide\u002Fnvim","1.notes\u002Fdevelopment\u002FIDE\u002Fnvim",{"title":71,"path":72,"stem":73},"tmux","\u002Fnotes\u002Fdevelopment\u002Fide\u002Ftmux","1.notes\u002Fdevelopment\u002FIDE\u002Ftmux",{"title":75,"path":76,"stem":77,"children":78,"page":30},"Algo","\u002Fnotes\u002Fdevelopment\u002Falgo","1.notes\u002Fdevelopment\u002Falgo",[79,83,87,91,95],{"title":80,"path":81,"stem":82},"Algorithms","\u002Fnotes\u002Fdevelopment\u002Falgo\u002Falgorithms","1.notes\u002Fdevelopment\u002Falgo\u002Falgorithms",{"title":84,"path":85,"stem":86},"Data Structures","\u002Fnotes\u002Fdevelopment\u002Falgo\u002Fdata_structures","1.notes\u002Fdevelopment\u002Falgo\u002Fdata_structures",{"title":88,"path":89,"stem":90},"Kata","\u002Fnotes\u002Fdevelopment\u002Falgo\u002Fkata","1.notes\u002Fdevelopment\u002Falgo\u002Fkata",{"title":92,"path":93,"stem":94},"O-notation","\u002Fnotes\u002Fdevelopment\u002Falgo\u002Fo-notation","1.notes\u002Fdevelopment\u002Falgo\u002Fo-notation",{"title":96,"path":97,"stem":98,"children":99,"page":30},"Sorting","\u002Fnotes\u002Fdevelopment\u002Falgo\u002Fsorting","1.notes\u002Fdevelopment\u002Falgo\u002Fsorting",[100,104,108],{"title":101,"path":102,"stem":103},"Buble Sort","\u002Fnotes\u002Fdevelopment\u002Falgo\u002Fsorting\u002Fbublesort","1.notes\u002Fdevelopment\u002Falgo\u002Fsorting\u002Fbublesort",{"title":105,"path":106,"stem":107},"Merge Sort","\u002Fnotes\u002Fdevelopment\u002Falgo\u002Fsorting\u002Fmergesort","1.notes\u002Fdevelopment\u002Falgo\u002Fsorting\u002Fmergesort",{"title":109,"path":110,"stem":111},"Quicksort","\u002Fnotes\u002Fdevelopment\u002Falgo\u002Fsorting\u002Fquicksort","1.notes\u002Fdevelopment\u002Falgo\u002Fsorting\u002Fquicksort",{"title":113,"path":114,"stem":115,"children":116,"page":30},"DataStructures","\u002Fnotes\u002Fdevelopment\u002Fdata_structures","1.notes\u002Fdevelopment\u002Fdata_structures",[117,121,125,129,133,137,141,145],{"title":118,"path":119,"stem":120},"ArrayList","\u002Fnotes\u002Fdevelopment\u002Fdata_structures\u002Farray_list","1.notes\u002Fdevelopment\u002Fdata_structures\u002Farray_list",{"title":122,"path":123,"stem":124},"Arrays","\u002Fnotes\u002Fdevelopment\u002Fdata_structures\u002Farrays","1.notes\u002Fdevelopment\u002Fdata_structures\u002Farrays",{"title":126,"path":127,"stem":128},"HashSet","\u002Fnotes\u002Fdevelopment\u002Fdata_structures\u002Fhash_set","1.notes\u002Fdevelopment\u002Fdata_structures\u002Fhash_set",{"title":130,"path":131,"stem":132},"LinkedList","\u002Fnotes\u002Fdevelopment\u002Fdata_structures\u002Flinked_list","1.notes\u002Fdevelopment\u002Fdata_structures\u002Flinked_list",{"title":134,"path":135,"stem":136},"PriorityQueue","\u002Fnotes\u002Fdevelopment\u002Fdata_structures\u002Fpriority_queue","1.notes\u002Fdevelopment\u002Fdata_structures\u002Fpriority_queue",{"title":138,"path":139,"stem":140},"Stack","\u002Fnotes\u002Fdevelopment\u002Fdata_structures\u002Fstack","1.notes\u002Fdevelopment\u002Fdata_structures\u002Fstack",{"title":142,"path":143,"stem":144},"TreeSet","\u002Fnotes\u002Fdevelopment\u002Fdata_structures\u002Ftree_set","1.notes\u002Fdevelopment\u002Fdata_structures\u002Ftree_set",{"title":146,"path":147,"stem":148},"Vector","\u002Fnotes\u002Fdevelopment\u002Fdata_structures\u002Fvector","1.notes\u002Fdevelopment\u002Fdata_structures\u002Fvector",{"title":150,"path":151,"stem":152,"children":153,"page":30},"Java","\u002Fnotes\u002Fdevelopment\u002Fjava","1.notes\u002Fdevelopment\u002Fjava",[154,158,162,166,170,174,178,182,186,190,194,198,202,206,210,214,218,222],{"title":155,"path":156,"stem":157},"Bit Operations","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fbit-operations","1.notes\u002Fdevelopment\u002Fjava\u002Fbit-operations",{"title":159,"path":160,"stem":161},"Cheatsheet","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fcheatsheet","1.notes\u002Fdevelopment\u002Fjava\u002Fcheatsheet",{"title":163,"path":164,"stem":165},"Clean Code","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fclean-code-presentation","1.notes\u002Fdevelopment\u002Fjava\u002Fclean-code-presentation",{"title":167,"path":168,"stem":169},"Java Datasource","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fdata-sources","1.notes\u002Fdevelopment\u002Fjava\u002Fdata-sources",{"title":171,"path":172,"stem":173},"Dependency Injection","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fdependency-injection-presentation","1.notes\u002Fdevelopment\u002Fjava\u002Fdependency-injection-presentation",{"title":175,"path":176,"stem":177},"Java SE","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fjava-standard-edition","1.notes\u002Fdevelopment\u002Fjava\u002Fjava-standard-edition",{"title":179,"path":180,"stem":181},"Java Memory Model","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fjmm","1.notes\u002Fdevelopment\u002Fjava\u002Fjmm",{"title":183,"path":184,"stem":185},"JPA","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fjpa","1.notes\u002Fdevelopment\u002Fjava\u002Fjpa",{"title":187,"path":188,"stem":189},"Keywords","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fkeywords","1.notes\u002Fdevelopment\u002Fjava\u002Fkeywords",{"title":191,"path":192,"stem":193},"Maven","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fmaven","1.notes\u002Fdevelopment\u002Fjava\u002Fmaven",{"title":195,"path":196,"stem":197},"Spring AOP","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fspring-aop-presentation","1.notes\u002Fdevelopment\u002Fjava\u002Fspring-aop-presentation",{"title":199,"path":200,"stem":201},"Spring Boot","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fspring-boot","1.notes\u002Fdevelopment\u002Fjava\u002Fspring-boot",{"title":203,"path":204,"stem":205},"Spring Core","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fspring-core-presentation","1.notes\u002Fdevelopment\u002Fjava\u002Fspring-core-presentation",{"title":207,"path":208,"stem":209},"Spring Data","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fspring-data","1.notes\u002Fdevelopment\u002Fjava\u002Fspring-data",{"title":211,"path":212,"stem":213},"Spring JDBC","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fspring-jdbc","1.notes\u002Fdevelopment\u002Fjava\u002Fspring-jdbc",{"title":215,"path":216,"stem":217},"Spring MVC","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fspring-mvc-presentation","1.notes\u002Fdevelopment\u002Fjava\u002Fspring-mvc-presentation",{"title":219,"path":220,"stem":221},"Spring Security","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Fspring-security","1.notes\u002Fdevelopment\u002Fjava\u002Fspring-security",{"title":223,"path":224,"stem":225},"Testing","\u002Fnotes\u002Fdevelopment\u002Fjava\u002Ftesting","1.notes\u002Fdevelopment\u002Fjava\u002Ftesting",{"title":227,"path":228,"stem":229,"children":230,"page":30},"Js","\u002Fnotes\u002Fdevelopment\u002Fjs","1.notes\u002Fdevelopment\u002Fjs",[231,235],{"title":232,"path":233,"stem":234},"JavaScript","\u002Fnotes\u002Fdevelopment\u002Fjs\u002Fjava-script","1.notes\u002Fdevelopment\u002Fjs\u002Fjava-script",{"title":236,"path":237,"stem":238},"NodeJS","\u002Fnotes\u002Fdevelopment\u002Fjs\u002Fnode-js","1.notes\u002Fdevelopment\u002Fjs\u002Fnode-js",{"title":240,"path":241,"stem":242,"children":243,"page":30},"PowerPlatform","\u002Fnotes\u002Fdevelopment\u002Fpower_platform","1.notes\u002Fdevelopment\u002Fpower_platform",[244,248,252,256],{"title":245,"path":246,"stem":247},"Power Apps","\u002Fnotes\u002Fdevelopment\u002Fpower_platform\u002Fpower-apps","1.notes\u002Fdevelopment\u002Fpower_platform\u002Fpower-apps",{"title":249,"path":250,"stem":251},"Power Automate","\u002Fnotes\u002Fdevelopment\u002Fpower_platform\u002Fpower-automate","1.notes\u002Fdevelopment\u002Fpower_platform\u002Fpower-automate",{"title":253,"path":254,"stem":255},"Power BI","\u002Fnotes\u002Fdevelopment\u002Fpower_platform\u002Fpower-bi","1.notes\u002Fdevelopment\u002Fpower_platform\u002Fpower-bi",{"title":257,"path":258,"stem":259},"Sharepoint","\u002Fnotes\u002Fdevelopment\u002Fpower_platform\u002Fsharepoint","1.notes\u002Fdevelopment\u002Fpower_platform\u002Fsharepoint",{"title":261,"path":262,"stem":263},"Python","\u002Fnotes\u002Fdevelopment\u002Fpython","1.notes\u002Fdevelopment\u002Fpython",{"title":265,"path":266,"stem":267,"children":268,"page":30},"Devops","\u002Fnotes\u002Fdevops","1.notes\u002Fdevops",[269,273,277,281,285,289,293,297,306],{"title":270,"path":271,"stem":272},"Containers","\u002Fnotes\u002Fdevops\u002Fcontainers","1.notes\u002Fdevops\u002Fcontainers",{"title":274,"path":275,"stem":276},"Curl","\u002Fnotes\u002Fdevops\u002Fcurl","1.notes\u002Fdevops\u002Fcurl",{"title":278,"path":279,"stem":280},"GCP","\u002Fnotes\u002Fdevops\u002Fgcp","1.notes\u002Fdevops\u002Fgcp",{"title":282,"path":283,"stem":284},"GIT","\u002Fnotes\u002Fdevops\u002Fgit","1.notes\u002Fdevops\u002Fgit",{"title":286,"path":287,"stem":288},"Jenkins","\u002Fnotes\u002Fdevops\u002Fjenkins","1.notes\u002Fdevops\u002Fjenkins",{"title":290,"path":291,"stem":292},"Kubernetes","\u002Fnotes\u002Fdevops\u002Fkubernetes","1.notes\u002Fdevops\u002Fkubernetes",{"title":294,"path":295,"stem":296},"Linux","\u002Fnotes\u002Fdevops\u002Flinux","1.notes\u002Fdevops\u002Flinux",{"title":298,"path":299,"stem":300,"children":301,"page":30},"Os","\u002Fnotes\u002Fdevops\u002Fos","1.notes\u002Fdevops\u002Fos",[302],{"title":303,"path":304,"stem":305},"MAC OS","\u002Fnotes\u002Fdevops\u002Fos\u002Fmacos","1.notes\u002Fdevops\u002Fos\u002Fmacos",{"title":307,"path":308,"stem":309},"WSL","\u002Fnotes\u002Fdevops\u002Fwsl","1.notes\u002Fdevops\u002Fwsl",{"title":311,"path":312,"stem":313,"children":314,"page":30},"Hardware","\u002Fnotes\u002Fhardware","1.notes\u002Fhardware",[315],{"title":316,"path":317,"stem":318},"Keyboard","\u002Fnotes\u002Fhardware\u002Fkeyboard","1.notes\u002Fhardware\u002Fkeyboard",{"title":320,"path":321,"stem":322,"children":323,"page":30},"Homelab","\u002Fnotes\u002Fhomelab","1.notes\u002Fhomelab",[324,328,337,350],{"title":325,"path":326,"stem":327},"Proxmox","\u002Fnotes\u002Fhomelab\u002F_-proxmox-1","1.notes\u002Fhomelab\u002F_ proxmox 1",{"title":329,"path":330,"stem":331,"children":332,"page":30},"Cloudflare","\u002Fnotes\u002Fhomelab\u002Fcloudflare","1.notes\u002Fhomelab\u002Fcloudflare",[333],{"title":334,"path":335,"stem":336},"Cloudflare Workers","\u002Fnotes\u002Fhomelab\u002Fcloudflare\u002Fworkers","1.notes\u002Fhomelab\u002Fcloudflare\u002Fworkers",{"title":338,"path":339,"stem":340,"children":341,"page":30},"HomeAssistant","\u002Fnotes\u002Fhomelab\u002Fhome_assistant","1.notes\u002Fhomelab\u002Fhome_assistant",[342,346],{"title":343,"path":344,"stem":345},"EspHome debugger","\u002Fnotes\u002Fhomelab\u002Fhome_assistant\u002Fesphome-debugger","1.notes\u002Fhomelab\u002Fhome_assistant\u002Fesphome-debugger",{"title":347,"path":348,"stem":349},"GIT integration","\u002Fnotes\u002Fhomelab\u002Fhome_assistant\u002Fgit-integration","1.notes\u002Fhomelab\u002Fhome_assistant\u002Fgit-integration",{"title":325,"path":351,"stem":352,"children":353},"\u002Fnotes\u002Fhomelab\u002Fproxmox","1.notes\u002Fhomelab\u002Fproxmox",[354,358,362,365,369,373,377],{"title":355,"path":356,"stem":357},"Issue: TASK ERROR: Device \u002Fdev\u002Fdri\u002Fcard1 does not exist","\u002Fnotes\u002Fhomelab\u002Fproxmox\u002Fissue_task_error_device_dev_dri_card1_does-not-exist","1.notes\u002Fhomelab\u002Fproxmox\u002FIssue_TASK_ERROR_device_dev_dri_card1_does not exist",{"title":359,"path":360,"stem":361},"Mount USB Drive To LXC Container","\u002Fnotes\u002Fhomelab\u002Fproxmox\u002Fmount-usb-drive-to-lxc-container","1.notes\u002Fhomelab\u002Fproxmox\u002FMount USB drive to LXC container",{"title":325,"path":363,"stem":364},"\u002Fnotes\u002Fhomelab\u002Fproxmox\u002F_-proxmox","1.notes\u002Fhomelab\u002Fproxmox\u002F_ proxmox",{"title":366,"path":367,"stem":368},"ARR","\u002Fnotes\u002Fhomelab\u002Fproxmox\u002Farr","1.notes\u002Fhomelab\u002Fproxmox\u002Farr",{"title":370,"path":371,"stem":372},"Auto login via SSH from Proxmox UI","\u002Fnotes\u002Fhomelab\u002Fproxmox\u002Fauto_login_via_ssh_from_proxmox_ui","1.notes\u002Fhomelab\u002Fproxmox\u002Fauto_login_via_ssh_from_proxmox_ui",{"title":374,"path":375,"stem":376},"Installation","\u002Fnotes\u002Fhomelab\u002Fproxmox\u002Fdokploy","1.notes\u002Fhomelab\u002Fproxmox\u002Fdokploy",{"title":290,"path":378,"stem":379},"\u002Fnotes\u002Fhomelab\u002Fproxmox\u002Fkubernetes","1.notes\u002Fhomelab\u002Fproxmox\u002Fkubernetes",{"title":381,"path":382,"stem":383,"children":384,"page":30},"Leadership","\u002Fnotes\u002Fleadership","1.notes\u002Fleadership",[385,389,393],{"title":386,"path":387,"stem":388},"Leader Toolbox","\u002Fnotes\u002Fleadership\u002Fleader-toolbox","1.notes\u002Fleadership\u002Fleader-toolbox",{"title":390,"path":391,"stem":392},"Enterprise Project Structure","\u002Fnotes\u002Fleadership\u002Fproject-doc-structure","1.notes\u002Fleadership\u002Fproject-doc-structure",{"title":394,"path":395,"stem":396},"Scrum template","\u002Fnotes\u002Fleadership\u002Fscrum-template","1.notes\u002Fleadership\u002Fscrum-template",{"title":398,"path":399,"stem":400,"children":401,"page":30},"Products","\u002Fnotes\u002Fproducts","1.notes\u002Fproducts",[402],{"title":403,"path":404,"stem":405},"BigQuery","\u002Fnotes\u002Fproducts\u002Fgcp-big-query","1.notes\u002Fproducts\u002Fgcp-big-query",{"id":407,"title":408,"authors":409,"badge":409,"body":410,"date":2700,"description":2701,"extension":2702,"image":409,"meta":2703,"navigation":639,"path":2705,"seo":2706,"stem":2707,"__hash__":2708},"posts\u002F2.blog\u002F2015-03-03-end-to-end-tests-with-intern.md","REST end to end testing Node applications with Intern framework",null,{"type":411,"value":412,"toc":2671},"minimark",[413,418,427,430,435,438,449,456,541,545,550,556,560,567,573,579,789,799,803,806,811,879,882,888,891,897,904,934,938,941,945,948,954,957,963,967,973,1052,1058,1064,1068,1072,1075,1081,1085,1088,1094,1097,1103,1107,1113,1119,1289,1293,1296,1300,1305,1535,1548,1552,1555,1561,1564,1570,1574,1577,1599,1602,1606,1609,1621,1625,1628,2484,2487,2493,2497,2501,2523,2527,2530,2533,2561,2569,2576,2580,2583,2594,2597,2614,2630,2637,2643,2647,2654,2657,2660,2667],[414,415,417],"h1",{"id":416},"introduction","Introduction",[419,420,421,422,426],"p",{},"In the previous post [Testing Node applications with Intern framework](",[423,424],"binding",{"value":425},"\u003C relref \"2015-03-01-unit-tests-with-intern\" >"," \"About Us\") I demostrated how to set up testing environment for unit tests with Intern and Grunt.\nToday I will show how to test REST endpoints with end to end tests in a speed of unit tests.",[419,428,429],{},"#Set up infrastructure",[431,432,434],"h2",{"id":433},"create-node-project","Create Node project",[419,436,437],{},"Create NodeJS project:",[439,440,445],"pre",{"className":441,"code":443,"language":444},[442],"language-text","mkdir intern-end-to-end-tests\ncd intern-end-to-end-tests\n","text",[446,447,443],"code",{"__ignoreMap":448},"",[419,450,451,452,455],{},"Create init ",[446,453,454],{},"package.json",":",[439,457,461],{"className":458,"code":459,"language":460,"meta":448,"style":448},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"name\": \"intern-end-to-end-tests\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\"\n}\n","js",[446,462,463,472,499,520,535],{"__ignoreMap":448},[464,465,468],"span",{"class":466,"line":467},"line",1,[464,469,471],{"class":470},"sMK4o","{\n",[464,473,475,478,482,485,489,491,494,496],{"class":466,"line":474},2,[464,476,477],{"class":470},"  \"",[464,479,481],{"class":480},"sfazB","name",[464,483,484],{"class":470},"\"",[464,486,488],{"class":487},"swJcz",": ",[464,490,484],{"class":470},[464,492,493],{"class":480},"intern-end-to-end-tests",[464,495,484],{"class":470},[464,497,498],{"class":470},",\n",[464,500,502,504,507,509,511,513,516,518],{"class":466,"line":501},3,[464,503,477],{"class":470},[464,505,506],{"class":480},"version",[464,508,484],{"class":470},[464,510,488],{"class":487},[464,512,484],{"class":470},[464,514,515],{"class":480},"1.0.0",[464,517,484],{"class":470},[464,519,498],{"class":470},[464,521,523,525,528,530,532],{"class":466,"line":522},4,[464,524,477],{"class":470},[464,526,527],{"class":480},"description",[464,529,484],{"class":470},[464,531,488],{"class":487},[464,533,534],{"class":470},"\"\"\n",[464,536,538],{"class":466,"line":537},5,[464,539,540],{"class":470},"}\n",[431,542,544],{"id":543},"implementing-rest-endpoint-using-expressjs","Implementing REST endpoint using ExpressJS",[546,547,549],"h3",{"id":548},"install-expressjs","Install ExpressJS:",[439,551,554],{"className":552,"code":553,"language":444},[442],"npm install express --save-dev\n",[446,555,553],{"__ignoreMap":448},[546,557,559],{"id":558},"implement-application-endpoints","Implement application endpoints",[419,561,562,563,566],{},"We will create application code in ",[446,564,565],{},"src"," directory:",[439,568,571],{"className":569,"code":570,"language":444},[442],"mkdir src\n",[446,572,570],{"__ignoreMap":448},[419,574,575,576,455],{},"Create file: ",[446,577,578],{},"src\u002Fapp.js",[439,580,582],{"className":458,"code":581,"language":460,"meta":448,"style":448},"var express = require('express');\nvar app = express();\n\napp.get('\u002Ftest', function (req, res) {\n    console.log('hitting test');\n    res.json({status: 'ok'});\n});\nconsole.log('App is configured');\nmodule.exports = app;\n",[446,583,584,618,635,641,684,707,743,752,775],{"__ignoreMap":448},[464,585,586,590,594,597,601,604,607,610,612,615],{"class":466,"line":467},[464,587,589],{"class":588},"spNyl","var",[464,591,593],{"class":592},"sTEyZ"," express ",[464,595,596],{"class":470},"=",[464,598,600],{"class":599},"s2Zo4"," require",[464,602,603],{"class":592},"(",[464,605,606],{"class":470},"'",[464,608,609],{"class":480},"express",[464,611,606],{"class":470},[464,613,614],{"class":592},")",[464,616,617],{"class":470},";\n",[464,619,620,622,625,627,630,633],{"class":466,"line":474},[464,621,589],{"class":588},[464,623,624],{"class":592}," app ",[464,626,596],{"class":470},[464,628,629],{"class":599}," express",[464,631,632],{"class":592},"()",[464,634,617],{"class":470},[464,636,637],{"class":466,"line":501},[464,638,640],{"emptyLinePlaceholder":639},true,"\n",[464,642,643,646,649,652,654,656,659,661,664,667,670,674,676,679,681],{"class":466,"line":522},[464,644,645],{"class":592},"app",[464,647,648],{"class":470},".",[464,650,651],{"class":599},"get",[464,653,603],{"class":592},[464,655,606],{"class":470},[464,657,658],{"class":480},"\u002Ftest",[464,660,606],{"class":470},[464,662,663],{"class":470},",",[464,665,666],{"class":588}," function",[464,668,669],{"class":470}," (",[464,671,673],{"class":672},"sHdIc","req",[464,675,663],{"class":470},[464,677,678],{"class":672}," res",[464,680,614],{"class":470},[464,682,683],{"class":470}," {\n",[464,685,686,689,691,694,696,698,701,703,705],{"class":466,"line":537},[464,687,688],{"class":592},"    console",[464,690,648],{"class":470},[464,692,693],{"class":599},"log",[464,695,603],{"class":487},[464,697,606],{"class":470},[464,699,700],{"class":480},"hitting test",[464,702,606],{"class":470},[464,704,614],{"class":487},[464,706,617],{"class":470},[464,708,710,713,715,718,720,723,726,728,731,734,736,739,741],{"class":466,"line":709},6,[464,711,712],{"class":592},"    res",[464,714,648],{"class":470},[464,716,717],{"class":599},"json",[464,719,603],{"class":487},[464,721,722],{"class":470},"{",[464,724,725],{"class":487},"status",[464,727,455],{"class":470},[464,729,730],{"class":470}," '",[464,732,733],{"class":480},"ok",[464,735,606],{"class":470},[464,737,738],{"class":470},"}",[464,740,614],{"class":487},[464,742,617],{"class":470},[464,744,746,748,750],{"class":466,"line":745},7,[464,747,738],{"class":470},[464,749,614],{"class":592},[464,751,617],{"class":470},[464,753,755,758,760,762,764,766,769,771,773],{"class":466,"line":754},8,[464,756,757],{"class":592},"console",[464,759,648],{"class":470},[464,761,693],{"class":599},[464,763,603],{"class":592},[464,765,606],{"class":470},[464,767,768],{"class":480},"App is configured",[464,770,606],{"class":470},[464,772,614],{"class":592},[464,774,617],{"class":470},[464,776,778,781,784,787],{"class":466,"line":777},9,[464,779,780],{"class":470},"module.exports",[464,782,783],{"class":470}," =",[464,785,786],{"class":592}," app",[464,788,617],{"class":470},[419,790,791,792,794,795,798],{},"Above application hosts ",[446,793,658],{}," endpoint which returns JSON: ",[446,796,797],{},"{status: 'ok'}"," and logs activity each activity.",[431,800,802],{"id":801},"hosting-application-on-the-server","Hosting application on the server",[419,804,805],{},"To host that application we will need server.",[419,807,575,808,455],{},[446,809,810],{},"src\u002Fserver.js",[439,812,814],{"className":458,"code":813,"language":460,"meta":448,"style":448},"var app = require('.\u002Fapp');\napp.listen(8080);\nconsole.log('Application is running on port 8080');\n",[446,815,816,839,858],{"__ignoreMap":448},[464,817,818,820,822,824,826,828,830,833,835,837],{"class":466,"line":467},[464,819,589],{"class":588},[464,821,624],{"class":592},[464,823,596],{"class":470},[464,825,600],{"class":599},[464,827,603],{"class":592},[464,829,606],{"class":470},[464,831,832],{"class":480},".\u002Fapp",[464,834,606],{"class":470},[464,836,614],{"class":592},[464,838,617],{"class":470},[464,840,841,843,845,848,850,854,856],{"class":466,"line":474},[464,842,645],{"class":592},[464,844,648],{"class":470},[464,846,847],{"class":599},"listen",[464,849,603],{"class":592},[464,851,853],{"class":852},"sbssI","8080",[464,855,614],{"class":592},[464,857,617],{"class":470},[464,859,860,862,864,866,868,870,873,875,877],{"class":466,"line":501},[464,861,757],{"class":592},[464,863,648],{"class":470},[464,865,693],{"class":599},[464,867,603],{"class":592},[464,869,606],{"class":470},[464,871,872],{"class":480},"Application is running on port 8080",[464,874,606],{"class":470},[464,876,614],{"class":592},[464,878,617],{"class":470},[419,880,881],{},"Lets run server:",[439,883,886],{"className":884,"code":885,"language":444},[442],"node src\u002Fserver\n",[446,887,885],{"__ignoreMap":448},[419,889,890],{},"Console output should display:",[439,892,895],{"className":893,"code":894,"language":444},[442],"App is configured\nApplication is running on port 8080\nhitting test\n",[446,896,894],{"__ignoreMap":448},[419,898,899,900,903],{},"And when hitting: ",[446,901,902],{},"http:\u002F\u002Flocalhost:8080\u002Ftest"," in the browser you should get:",[439,905,907],{"className":458,"code":906,"language":460,"meta":448,"style":448},"{\n\"status\": \"ok\"\n}\n",[446,908,909,913,930],{"__ignoreMap":448},[464,910,911],{"class":466,"line":467},[464,912,471],{"class":470},[464,914,915,917,919,921,923,925,927],{"class":466,"line":474},[464,916,484],{"class":470},[464,918,725],{"class":480},[464,920,484],{"class":470},[464,922,488],{"class":487},[464,924,484],{"class":470},[464,926,733],{"class":480},[464,928,929],{"class":470},"\"\n",[464,931,932],{"class":466,"line":501},[464,933,540],{"class":470},[431,935,937],{"id":936},"install-and-initialize-grunt","Install and initialize Grunt",[419,939,940],{},"Before we start writing tests we need some test executor. For this purpose I use Grunt.",[546,942,944],{"id":943},"installing-grunt-dependencies","Installing Grunt dependencies",[419,946,947],{},"If you never used Grunt before you must first install it globally:",[439,949,952],{"className":950,"code":951,"language":444},[442],"npm install -g grunt\n",[446,953,951],{"__ignoreMap":448},[419,955,956],{},"Install Grunt locally:",[439,958,961],{"className":959,"code":960,"language":444},[442],"npm install grunt --save-dev\n",[446,962,960],{"__ignoreMap":448},[546,964,966],{"id":965},"grunt-configuration","Grunt configuration",[419,968,969,970,455],{},"Configure grunt, create ",[446,971,972],{},"Gruntfile.js",[439,974,976],{"className":458,"code":975,"language":460,"meta":448,"style":448},"module.exports = function (grunt) {\n    grunt.initConfig({\n    });\n\n    grunt.registerTask('default', []);\n};\n",[446,977,978,995,1009,1018,1022,1047],{"__ignoreMap":448},[464,979,980,982,984,986,988,991,993],{"class":466,"line":467},[464,981,780],{"class":470},[464,983,783],{"class":470},[464,985,666],{"class":588},[464,987,669],{"class":470},[464,989,990],{"class":672},"grunt",[464,992,614],{"class":470},[464,994,683],{"class":470},[464,996,997,1000,1002,1005,1007],{"class":466,"line":474},[464,998,999],{"class":592},"    grunt",[464,1001,648],{"class":470},[464,1003,1004],{"class":599},"initConfig",[464,1006,603],{"class":487},[464,1008,471],{"class":470},[464,1010,1011,1014,1016],{"class":466,"line":501},[464,1012,1013],{"class":470},"    }",[464,1015,614],{"class":487},[464,1017,617],{"class":470},[464,1019,1020],{"class":466,"line":522},[464,1021,640],{"emptyLinePlaceholder":639},[464,1023,1024,1026,1028,1031,1033,1035,1038,1040,1042,1045],{"class":466,"line":537},[464,1025,999],{"class":592},[464,1027,648],{"class":470},[464,1029,1030],{"class":599},"registerTask",[464,1032,603],{"class":487},[464,1034,606],{"class":470},[464,1036,1037],{"class":480},"default",[464,1039,606],{"class":470},[464,1041,663],{"class":470},[464,1043,1044],{"class":487}," [])",[464,1046,617],{"class":470},[464,1048,1049],{"class":466,"line":709},[464,1050,1051],{"class":470},"};\n",[419,1053,1054,1055,1057],{},"Now if you execute: ",[446,1056,990],{}," you should have such console output:",[439,1059,1062],{"className":1060,"code":1061,"language":444},[442],"Done, without errors.\n",[446,1063,1061],{"__ignoreMap":448},[431,1065,1067],{"id":1066},"install-and-configure-intern","Install and configure Intern",[546,1069,1071],{"id":1070},"installing-intern-dependencies","Installing Intern dependencies",[419,1073,1074],{},"Install Intern dependency:",[439,1076,1079],{"className":1077,"code":1078,"language":444},[442],"npm install intern --save-dev\n",[446,1080,1078],{"__ignoreMap":448},[546,1082,1084],{"id":1083},"intern-configuration","Intern configuration",[419,1086,1087],{},"Create tests directory:",[439,1089,1092],{"className":1090,"code":1091,"language":444},[442],"mkdir test\n",[446,1093,1091],{"__ignoreMap":448},[419,1095,1096],{},"Prepare intern configuration by copying example from intern directory:",[439,1098,1101],{"className":1099,"code":1100,"language":444},[442],"cp node_modules\u002Fintern\u002Ftests\u002Fexample.intern.js test\u002Fintern-config.js\n",[446,1102,1100],{"__ignoreMap":448},[431,1104,1106],{"id":1105},"create-first-test","Create first test",[439,1108,1111],{"className":1109,"code":1110,"language":444},[442],"mkdir test\u002Fe2e\n",[446,1112,1110],{"__ignoreMap":448},[419,1114,1115,1116,455],{},"Create file, ",[446,1117,1118],{},"test\u002Fe2e\u002FtestRestTest.js",[439,1120,1122],{"className":458,"code":1121,"language":460,"meta":448,"style":448},"define(function (require) {\n    var suite = require('intern!object');\n    var expect = require('intern\u002Fchai!expect');\n\n\n    suite({\n        ' strings': function () {\n            expect(\"Piotr\").to.equal('Piotr');\n        }\n    });\n});\n",[446,1123,1124,1143,1168,1192,1196,1200,1209,1228,1266,1271,1280],{"__ignoreMap":448},[464,1125,1126,1129,1131,1134,1136,1139,1141],{"class":466,"line":467},[464,1127,1128],{"class":599},"define",[464,1130,603],{"class":592},[464,1132,1133],{"class":588},"function",[464,1135,669],{"class":470},[464,1137,1138],{"class":672},"require",[464,1140,614],{"class":470},[464,1142,683],{"class":470},[464,1144,1145,1148,1151,1153,1155,1157,1159,1162,1164,1166],{"class":466,"line":474},[464,1146,1147],{"class":588},"    var",[464,1149,1150],{"class":592}," suite",[464,1152,783],{"class":470},[464,1154,600],{"class":599},[464,1156,603],{"class":487},[464,1158,606],{"class":470},[464,1160,1161],{"class":480},"intern!object",[464,1163,606],{"class":470},[464,1165,614],{"class":487},[464,1167,617],{"class":470},[464,1169,1170,1172,1175,1177,1179,1181,1183,1186,1188,1190],{"class":466,"line":501},[464,1171,1147],{"class":588},[464,1173,1174],{"class":592}," expect",[464,1176,783],{"class":470},[464,1178,600],{"class":599},[464,1180,603],{"class":487},[464,1182,606],{"class":470},[464,1184,1185],{"class":480},"intern\u002Fchai!expect",[464,1187,606],{"class":470},[464,1189,614],{"class":487},[464,1191,617],{"class":470},[464,1193,1194],{"class":466,"line":522},[464,1195,640],{"emptyLinePlaceholder":639},[464,1197,1198],{"class":466,"line":537},[464,1199,640],{"emptyLinePlaceholder":639},[464,1201,1202,1205,1207],{"class":466,"line":709},[464,1203,1204],{"class":599},"    suite",[464,1206,603],{"class":487},[464,1208,471],{"class":470},[464,1210,1211,1214,1217,1219,1221,1223,1226],{"class":466,"line":745},[464,1212,1213],{"class":470},"        '",[464,1215,1216],{"class":487}," strings",[464,1218,606],{"class":470},[464,1220,455],{"class":470},[464,1222,666],{"class":588},[464,1224,1225],{"class":470}," ()",[464,1227,683],{"class":470},[464,1229,1230,1233,1235,1237,1240,1242,1244,1246,1249,1251,1254,1256,1258,1260,1262,1264],{"class":466,"line":754},[464,1231,1232],{"class":599},"            expect",[464,1234,603],{"class":487},[464,1236,484],{"class":470},[464,1238,1239],{"class":480},"Piotr",[464,1241,484],{"class":470},[464,1243,614],{"class":487},[464,1245,648],{"class":470},[464,1247,1248],{"class":592},"to",[464,1250,648],{"class":470},[464,1252,1253],{"class":599},"equal",[464,1255,603],{"class":487},[464,1257,606],{"class":470},[464,1259,1239],{"class":480},[464,1261,606],{"class":470},[464,1263,614],{"class":487},[464,1265,617],{"class":470},[464,1267,1268],{"class":466,"line":777},[464,1269,1270],{"class":470},"        }\n",[464,1272,1274,1276,1278],{"class":466,"line":1273},10,[464,1275,1013],{"class":470},[464,1277,614],{"class":487},[464,1279,617],{"class":470},[464,1281,1283,1285,1287],{"class":466,"line":1282},11,[464,1284,738],{"class":470},[464,1286,614],{"class":592},[464,1288,617],{"class":470},[431,1290,1292],{"id":1291},"execute-intern-tests-with-grunt","Execute Intern tests with Grunt",[419,1294,1295],{},"Now we are ready to prepare test executor.",[546,1297,1299],{"id":1298},"configure-grunt","Configure Grunt",[419,1301,1302,1303,455],{},"Lets modify ",[446,1304,972],{},[439,1306,1308],{"className":458,"code":1307,"language":460,"meta":448,"style":448},"module.exports = function (grunt) {\n\n    grunt.initConfig({\n        intern: {\n            e2e_testing: {\n                options: {\n                    config: 'test\u002Fintern-config',\n                    suites: ['test\u002Fe2e\u002FtestRestTest']\n                }\n            }\n        }\n    });\n\n    grunt.loadNpmTasks('intern');\n\n    grunt.registerTask('default', ['test']);\n    grunt.registerTask('test', ['intern']);\n\n};\n\n",[446,1309,1310,1326,1330,1342,1351,1360,1369,1385,1405,1410,1415,1419,1428,1433,1456,1461,1494,1525,1530],{"__ignoreMap":448},[464,1311,1312,1314,1316,1318,1320,1322,1324],{"class":466,"line":467},[464,1313,780],{"class":470},[464,1315,783],{"class":470},[464,1317,666],{"class":588},[464,1319,669],{"class":470},[464,1321,990],{"class":672},[464,1323,614],{"class":470},[464,1325,683],{"class":470},[464,1327,1328],{"class":466,"line":474},[464,1329,640],{"emptyLinePlaceholder":639},[464,1331,1332,1334,1336,1338,1340],{"class":466,"line":501},[464,1333,999],{"class":592},[464,1335,648],{"class":470},[464,1337,1004],{"class":599},[464,1339,603],{"class":487},[464,1341,471],{"class":470},[464,1343,1344,1347,1349],{"class":466,"line":522},[464,1345,1346],{"class":487},"        intern",[464,1348,455],{"class":470},[464,1350,683],{"class":470},[464,1352,1353,1356,1358],{"class":466,"line":537},[464,1354,1355],{"class":487},"            e2e_testing",[464,1357,455],{"class":470},[464,1359,683],{"class":470},[464,1361,1362,1365,1367],{"class":466,"line":709},[464,1363,1364],{"class":487},"                options",[464,1366,455],{"class":470},[464,1368,683],{"class":470},[464,1370,1371,1374,1376,1378,1381,1383],{"class":466,"line":745},[464,1372,1373],{"class":487},"                    config",[464,1375,455],{"class":470},[464,1377,730],{"class":470},[464,1379,1380],{"class":480},"test\u002Fintern-config",[464,1382,606],{"class":470},[464,1384,498],{"class":470},[464,1386,1387,1390,1392,1395,1397,1400,1402],{"class":466,"line":754},[464,1388,1389],{"class":487},"                    suites",[464,1391,455],{"class":470},[464,1393,1394],{"class":487}," [",[464,1396,606],{"class":470},[464,1398,1399],{"class":480},"test\u002Fe2e\u002FtestRestTest",[464,1401,606],{"class":470},[464,1403,1404],{"class":487},"]\n",[464,1406,1407],{"class":466,"line":777},[464,1408,1409],{"class":470},"                }\n",[464,1411,1412],{"class":466,"line":1273},[464,1413,1414],{"class":470},"            }\n",[464,1416,1417],{"class":466,"line":1282},[464,1418,1270],{"class":470},[464,1420,1422,1424,1426],{"class":466,"line":1421},12,[464,1423,1013],{"class":470},[464,1425,614],{"class":487},[464,1427,617],{"class":470},[464,1429,1431],{"class":466,"line":1430},13,[464,1432,640],{"emptyLinePlaceholder":639},[464,1434,1436,1438,1440,1443,1445,1447,1450,1452,1454],{"class":466,"line":1435},14,[464,1437,999],{"class":592},[464,1439,648],{"class":470},[464,1441,1442],{"class":599},"loadNpmTasks",[464,1444,603],{"class":487},[464,1446,606],{"class":470},[464,1448,1449],{"class":480},"intern",[464,1451,606],{"class":470},[464,1453,614],{"class":487},[464,1455,617],{"class":470},[464,1457,1459],{"class":466,"line":1458},15,[464,1460,640],{"emptyLinePlaceholder":639},[464,1462,1464,1466,1468,1470,1472,1474,1476,1478,1480,1482,1484,1487,1489,1492],{"class":466,"line":1463},16,[464,1465,999],{"class":592},[464,1467,648],{"class":470},[464,1469,1030],{"class":599},[464,1471,603],{"class":487},[464,1473,606],{"class":470},[464,1475,1037],{"class":480},[464,1477,606],{"class":470},[464,1479,663],{"class":470},[464,1481,1394],{"class":487},[464,1483,606],{"class":470},[464,1485,1486],{"class":480},"test",[464,1488,606],{"class":470},[464,1490,1491],{"class":487},"])",[464,1493,617],{"class":470},[464,1495,1497,1499,1501,1503,1505,1507,1509,1511,1513,1515,1517,1519,1521,1523],{"class":466,"line":1496},17,[464,1498,999],{"class":592},[464,1500,648],{"class":470},[464,1502,1030],{"class":599},[464,1504,603],{"class":487},[464,1506,606],{"class":470},[464,1508,1486],{"class":480},[464,1510,606],{"class":470},[464,1512,663],{"class":470},[464,1514,1394],{"class":487},[464,1516,606],{"class":470},[464,1518,1449],{"class":480},[464,1520,606],{"class":470},[464,1522,1491],{"class":487},[464,1524,617],{"class":470},[464,1526,1528],{"class":466,"line":1527},18,[464,1529,640],{"emptyLinePlaceholder":639},[464,1531,1533],{"class":466,"line":1532},19,[464,1534,1051],{"class":470},[419,1536,1537,1538,1540,1541,1544,1545,1547],{},"This configuration loads ",[446,1539,1449],{}," task, configures ",[446,1542,1543],{},"intern:e2e_testing"," task and assignes it to ",[446,1546,1486],{}," alias task.",[546,1549,1551],{"id":1550},"executing-intern-tests","Executing Intern tests",[419,1553,1554],{},"Lets execute test task:",[439,1556,1559],{"className":1557,"code":1558,"language":444},[442],"grunt test\n",[446,1560,1558],{"__ignoreMap":448},[419,1562,1563],{},"With output:",[439,1565,1568],{"className":1566,"code":1567,"language":444},[442],"Running \"intern:e2e_testing\" (intern) task\n>> PASS: main -  -  strings (0ms)\n>> 0\u002F1 tests failed\n>> 0\u002F1 tests failed\n",[446,1569,1567],{"__ignoreMap":448},[431,1571,1573],{"id":1572},"summary","Summary",[419,1575,1576],{},"At this point we have configure:",[1578,1579,1580,1587,1590,1593,1596],"ul",{},[1581,1582,1583,1584,1586],"li",{},"REST application with ",[446,1585,658],{}," endpoint",[1581,1588,1589],{},"Server that hosts that application",[1581,1591,1592],{},"Configured task executor, and tasks configuration",[1581,1594,1595],{},"Configured test framework with unit suites",[1581,1597,1598],{},"Written first unit test which actually doesn't test application, but was made to check if everything works fine",[419,1600,1601],{},"Pretty much, isn't it?",[414,1603,1605],{"id":1604},"create-real-end-to-end-test","Create real end to end test",[419,1607,1608],{},"At this point we have configured infrastructure that allows now to focus on creating real end to end test.\nThe sequence of the testing is:",[1610,1611,1612,1615,1618],"ol",{},[1581,1613,1614],{},"Prepare Express application and host it on the local server",[1581,1616,1617],{},"Execute all suite test cases which will call local REST endpoint and ensure they are valid",[1581,1619,1620],{},"Shut down server",[431,1622,1624],{"id":1623},"full-example","Full example",[419,1626,1627],{},"Full example of the test lokks as below:",[439,1629,1631],{"className":458,"code":1630,"language":460,"meta":448,"style":448},"define(function (require) {\n    var suite = require('intern!object'),\n        app = require('intern\u002Fdojo\u002Fnode!..\u002F..\u002Fsrc\u002Fapp'),\n        chai = require('intern\u002Fdojo\u002Fnode!chai'), \u002F\u002Fdellivers promieses implementation used in setup method\n        expect = chai.expect,\n        chaiHttp = require('intern\u002Fdojo\u002Fnode!chai-http'), \u002F\u002Fdellivers promieses implementation used in setup method\n        q = require('intern\u002Fdojo\u002Fnode!q'), \u002F\u002Fdellivers promieses implementation used in setup method\n        portfinder = require('intern\u002Fdojo\u002Fnode!portfinder'); \u002F\u002Fdellivers promieses implementation used in setup method\n\n    var me = this;\n    var api = function () {\n        return chai.request('http:\u002F\u002Flocalhost:' + me.port);\n    }\n\n    suite({\n        'setup': function () {\n            chai.use(chaiHttp); \u002F\u002Fconfigure chai with chaiHttp\n            chai.request.addPromises(q.Promise); \u002F\u002Fconfigure promise for chaiHttp\n\n            var deferred = q.defer();\n            portfinder.getPort(function (err, port) {\n                me.port = port;\n                me.server = app.listen(me.port, function () {\n                    console.log('server is running on port %j', me.port);\n                    deferred.resolve();\n                });\n            });\n            return deferred.promise;\n\n        },\n        'teardown': function () {\n            me.server.close();\n        },\n        'shoud test return status ok json': function () {\n            return api()                                        \u002F\u002Fprepare url\n                .get('\u002Ftest')                                   \u002F\u002Fmake a call\n                .then(function (res) {                          \u002F\u002Freturn call result\n                    expect(res.body).to.eql({status: 'ok'});    \u002F\u002Fmake assertions with chai\n                });\n        },\n        'another test': function () {\n            return api()\n                .get('\u002Ftest')\n                .then(function (res) {\n                    expect(res.body).to.eql({status: 'ok'});\n                });\n        }\n    });\n});\n\n",[446,1632,1633,1649,1671,1693,1719,1736,1760,1784,1809,1813,1825,1840,1876,1881,1885,1893,1910,1932,1962,1966,1989,2018,2034,2069,2100,2115,2125,2135,2150,2155,2161,2179,2198,2203,2221,2234,2256,2281,2330,2339,2344,2362,2372,2390,2409,2452,2461,2466,2475],{"__ignoreMap":448},[464,1634,1635,1637,1639,1641,1643,1645,1647],{"class":466,"line":467},[464,1636,1128],{"class":599},[464,1638,603],{"class":592},[464,1640,1133],{"class":588},[464,1642,669],{"class":470},[464,1644,1138],{"class":672},[464,1646,614],{"class":470},[464,1648,683],{"class":470},[464,1650,1651,1653,1655,1657,1659,1661,1663,1665,1667,1669],{"class":466,"line":474},[464,1652,1147],{"class":588},[464,1654,1150],{"class":592},[464,1656,783],{"class":470},[464,1658,600],{"class":599},[464,1660,603],{"class":487},[464,1662,606],{"class":470},[464,1664,1161],{"class":480},[464,1666,606],{"class":470},[464,1668,614],{"class":487},[464,1670,498],{"class":470},[464,1672,1673,1676,1678,1680,1682,1684,1687,1689,1691],{"class":466,"line":501},[464,1674,1675],{"class":592},"        app",[464,1677,783],{"class":470},[464,1679,600],{"class":599},[464,1681,603],{"class":487},[464,1683,606],{"class":470},[464,1685,1686],{"class":480},"intern\u002Fdojo\u002Fnode!..\u002F..\u002Fsrc\u002Fapp",[464,1688,606],{"class":470},[464,1690,614],{"class":487},[464,1692,498],{"class":470},[464,1694,1695,1698,1700,1702,1704,1706,1709,1711,1713,1715],{"class":466,"line":522},[464,1696,1697],{"class":592},"        chai",[464,1699,783],{"class":470},[464,1701,600],{"class":599},[464,1703,603],{"class":487},[464,1705,606],{"class":470},[464,1707,1708],{"class":480},"intern\u002Fdojo\u002Fnode!chai",[464,1710,606],{"class":470},[464,1712,614],{"class":487},[464,1714,663],{"class":470},[464,1716,1718],{"class":1717},"sHwdD"," \u002F\u002Fdellivers promieses implementation used in setup method\n",[464,1720,1721,1724,1726,1729,1731,1734],{"class":466,"line":537},[464,1722,1723],{"class":592},"        expect",[464,1725,783],{"class":470},[464,1727,1728],{"class":592}," chai",[464,1730,648],{"class":470},[464,1732,1733],{"class":592},"expect",[464,1735,498],{"class":470},[464,1737,1738,1741,1743,1745,1747,1749,1752,1754,1756,1758],{"class":466,"line":709},[464,1739,1740],{"class":592},"        chaiHttp",[464,1742,783],{"class":470},[464,1744,600],{"class":599},[464,1746,603],{"class":487},[464,1748,606],{"class":470},[464,1750,1751],{"class":480},"intern\u002Fdojo\u002Fnode!chai-http",[464,1753,606],{"class":470},[464,1755,614],{"class":487},[464,1757,663],{"class":470},[464,1759,1718],{"class":1717},[464,1761,1762,1765,1767,1769,1771,1773,1776,1778,1780,1782],{"class":466,"line":745},[464,1763,1764],{"class":592},"        q",[464,1766,783],{"class":470},[464,1768,600],{"class":599},[464,1770,603],{"class":487},[464,1772,606],{"class":470},[464,1774,1775],{"class":480},"intern\u002Fdojo\u002Fnode!q",[464,1777,606],{"class":470},[464,1779,614],{"class":487},[464,1781,663],{"class":470},[464,1783,1718],{"class":1717},[464,1785,1786,1789,1791,1793,1795,1797,1800,1802,1804,1807],{"class":466,"line":754},[464,1787,1788],{"class":592},"        portfinder",[464,1790,783],{"class":470},[464,1792,600],{"class":599},[464,1794,603],{"class":487},[464,1796,606],{"class":470},[464,1798,1799],{"class":480},"intern\u002Fdojo\u002Fnode!portfinder",[464,1801,606],{"class":470},[464,1803,614],{"class":487},[464,1805,1806],{"class":470},";",[464,1808,1718],{"class":1717},[464,1810,1811],{"class":466,"line":777},[464,1812,640],{"emptyLinePlaceholder":639},[464,1814,1815,1817,1820,1822],{"class":466,"line":1273},[464,1816,1147],{"class":588},[464,1818,1819],{"class":592}," me",[464,1821,783],{"class":470},[464,1823,1824],{"class":470}," this;\n",[464,1826,1827,1829,1832,1834,1836,1838],{"class":466,"line":1282},[464,1828,1147],{"class":588},[464,1830,1831],{"class":592}," api",[464,1833,783],{"class":470},[464,1835,666],{"class":588},[464,1837,1225],{"class":470},[464,1839,683],{"class":470},[464,1841,1842,1846,1848,1850,1853,1855,1857,1860,1862,1865,1867,1869,1872,1874],{"class":466,"line":1421},[464,1843,1845],{"class":1844},"s7zQu","        return",[464,1847,1728],{"class":592},[464,1849,648],{"class":470},[464,1851,1852],{"class":599},"request",[464,1854,603],{"class":487},[464,1856,606],{"class":470},[464,1858,1859],{"class":480},"http:\u002F\u002Flocalhost:",[464,1861,606],{"class":470},[464,1863,1864],{"class":470}," +",[464,1866,1819],{"class":592},[464,1868,648],{"class":470},[464,1870,1871],{"class":592},"port",[464,1873,614],{"class":487},[464,1875,617],{"class":470},[464,1877,1878],{"class":466,"line":1430},[464,1879,1880],{"class":470},"    }\n",[464,1882,1883],{"class":466,"line":1435},[464,1884,640],{"emptyLinePlaceholder":639},[464,1886,1887,1889,1891],{"class":466,"line":1458},[464,1888,1204],{"class":599},[464,1890,603],{"class":487},[464,1892,471],{"class":470},[464,1894,1895,1897,1900,1902,1904,1906,1908],{"class":466,"line":1463},[464,1896,1213],{"class":470},[464,1898,1899],{"class":487},"setup",[464,1901,606],{"class":470},[464,1903,455],{"class":470},[464,1905,666],{"class":588},[464,1907,1225],{"class":470},[464,1909,683],{"class":470},[464,1911,1912,1915,1917,1920,1922,1925,1927,1929],{"class":466,"line":1496},[464,1913,1914],{"class":592},"            chai",[464,1916,648],{"class":470},[464,1918,1919],{"class":599},"use",[464,1921,603],{"class":487},[464,1923,1924],{"class":592},"chaiHttp",[464,1926,614],{"class":487},[464,1928,1806],{"class":470},[464,1930,1931],{"class":1717}," \u002F\u002Fconfigure chai with chaiHttp\n",[464,1933,1934,1936,1938,1940,1942,1945,1947,1950,1952,1955,1957,1959],{"class":466,"line":1527},[464,1935,1914],{"class":592},[464,1937,648],{"class":470},[464,1939,1852],{"class":592},[464,1941,648],{"class":470},[464,1943,1944],{"class":599},"addPromises",[464,1946,603],{"class":487},[464,1948,1949],{"class":592},"q",[464,1951,648],{"class":470},[464,1953,1954],{"class":592},"Promise",[464,1956,614],{"class":487},[464,1958,1806],{"class":470},[464,1960,1961],{"class":1717}," \u002F\u002Fconfigure promise for chaiHttp\n",[464,1963,1964],{"class":466,"line":1532},[464,1965,640],{"emptyLinePlaceholder":639},[464,1967,1969,1972,1975,1977,1980,1982,1985,1987],{"class":466,"line":1968},20,[464,1970,1971],{"class":588},"            var",[464,1973,1974],{"class":592}," deferred",[464,1976,783],{"class":470},[464,1978,1979],{"class":592}," q",[464,1981,648],{"class":470},[464,1983,1984],{"class":599},"defer",[464,1986,632],{"class":487},[464,1988,617],{"class":470},[464,1990,1992,1995,1997,2000,2002,2004,2006,2009,2011,2014,2016],{"class":466,"line":1991},21,[464,1993,1994],{"class":592},"            portfinder",[464,1996,648],{"class":470},[464,1998,1999],{"class":599},"getPort",[464,2001,603],{"class":487},[464,2003,1133],{"class":588},[464,2005,669],{"class":470},[464,2007,2008],{"class":672},"err",[464,2010,663],{"class":470},[464,2012,2013],{"class":672}," port",[464,2015,614],{"class":470},[464,2017,683],{"class":470},[464,2019,2021,2024,2026,2028,2030,2032],{"class":466,"line":2020},22,[464,2022,2023],{"class":592},"                me",[464,2025,648],{"class":470},[464,2027,1871],{"class":592},[464,2029,783],{"class":470},[464,2031,2013],{"class":592},[464,2033,617],{"class":470},[464,2035,2037,2039,2041,2044,2046,2048,2050,2052,2054,2057,2059,2061,2063,2065,2067],{"class":466,"line":2036},23,[464,2038,2023],{"class":592},[464,2040,648],{"class":470},[464,2042,2043],{"class":592},"server",[464,2045,783],{"class":470},[464,2047,786],{"class":592},[464,2049,648],{"class":470},[464,2051,847],{"class":599},[464,2053,603],{"class":487},[464,2055,2056],{"class":592},"me",[464,2058,648],{"class":470},[464,2060,1871],{"class":592},[464,2062,663],{"class":470},[464,2064,666],{"class":588},[464,2066,1225],{"class":470},[464,2068,683],{"class":470},[464,2070,2072,2075,2077,2079,2081,2083,2086,2088,2090,2092,2094,2096,2098],{"class":466,"line":2071},24,[464,2073,2074],{"class":592},"                    console",[464,2076,648],{"class":470},[464,2078,693],{"class":599},[464,2080,603],{"class":487},[464,2082,606],{"class":470},[464,2084,2085],{"class":480},"server is running on port %j",[464,2087,606],{"class":470},[464,2089,663],{"class":470},[464,2091,1819],{"class":592},[464,2093,648],{"class":470},[464,2095,1871],{"class":592},[464,2097,614],{"class":487},[464,2099,617],{"class":470},[464,2101,2103,2106,2108,2111,2113],{"class":466,"line":2102},25,[464,2104,2105],{"class":592},"                    deferred",[464,2107,648],{"class":470},[464,2109,2110],{"class":599},"resolve",[464,2112,632],{"class":487},[464,2114,617],{"class":470},[464,2116,2118,2121,2123],{"class":466,"line":2117},26,[464,2119,2120],{"class":470},"                }",[464,2122,614],{"class":487},[464,2124,617],{"class":470},[464,2126,2128,2131,2133],{"class":466,"line":2127},27,[464,2129,2130],{"class":470},"            }",[464,2132,614],{"class":487},[464,2134,617],{"class":470},[464,2136,2138,2141,2143,2145,2148],{"class":466,"line":2137},28,[464,2139,2140],{"class":1844},"            return",[464,2142,1974],{"class":592},[464,2144,648],{"class":470},[464,2146,2147],{"class":592},"promise",[464,2149,617],{"class":470},[464,2151,2153],{"class":466,"line":2152},29,[464,2154,640],{"emptyLinePlaceholder":639},[464,2156,2158],{"class":466,"line":2157},30,[464,2159,2160],{"class":470},"        },\n",[464,2162,2164,2166,2169,2171,2173,2175,2177],{"class":466,"line":2163},31,[464,2165,1213],{"class":470},[464,2167,2168],{"class":487},"teardown",[464,2170,606],{"class":470},[464,2172,455],{"class":470},[464,2174,666],{"class":588},[464,2176,1225],{"class":470},[464,2178,683],{"class":470},[464,2180,2182,2185,2187,2189,2191,2194,2196],{"class":466,"line":2181},32,[464,2183,2184],{"class":592},"            me",[464,2186,648],{"class":470},[464,2188,2043],{"class":592},[464,2190,648],{"class":470},[464,2192,2193],{"class":599},"close",[464,2195,632],{"class":487},[464,2197,617],{"class":470},[464,2199,2201],{"class":466,"line":2200},33,[464,2202,2160],{"class":470},[464,2204,2206,2208,2211,2213,2215,2217,2219],{"class":466,"line":2205},34,[464,2207,1213],{"class":470},[464,2209,2210],{"class":487},"shoud test return status ok json",[464,2212,606],{"class":470},[464,2214,455],{"class":470},[464,2216,666],{"class":588},[464,2218,1225],{"class":470},[464,2220,683],{"class":470},[464,2222,2224,2226,2228,2231],{"class":466,"line":2223},35,[464,2225,2140],{"class":1844},[464,2227,1831],{"class":599},[464,2229,2230],{"class":487},"()                                        ",[464,2232,2233],{"class":1717},"\u002F\u002Fprepare url\n",[464,2235,2237,2240,2242,2244,2246,2248,2250,2253],{"class":466,"line":2236},36,[464,2238,2239],{"class":470},"                .",[464,2241,651],{"class":599},[464,2243,603],{"class":487},[464,2245,606],{"class":470},[464,2247,658],{"class":480},[464,2249,606],{"class":470},[464,2251,2252],{"class":487},")                                   ",[464,2254,2255],{"class":1717},"\u002F\u002Fmake a call\n",[464,2257,2259,2261,2264,2266,2268,2270,2273,2275,2278],{"class":466,"line":2258},37,[464,2260,2239],{"class":470},[464,2262,2263],{"class":599},"then",[464,2265,603],{"class":487},[464,2267,1133],{"class":588},[464,2269,669],{"class":470},[464,2271,2272],{"class":672},"res",[464,2274,614],{"class":470},[464,2276,2277],{"class":470}," {",[464,2279,2280],{"class":1717},"                          \u002F\u002Freturn call result\n",[464,2282,2284,2287,2289,2291,2293,2296,2298,2300,2302,2304,2307,2309,2311,2313,2315,2317,2319,2321,2323,2325,2327],{"class":466,"line":2283},38,[464,2285,2286],{"class":599},"                    expect",[464,2288,603],{"class":487},[464,2290,2272],{"class":592},[464,2292,648],{"class":470},[464,2294,2295],{"class":592},"body",[464,2297,614],{"class":487},[464,2299,648],{"class":470},[464,2301,1248],{"class":592},[464,2303,648],{"class":470},[464,2305,2306],{"class":599},"eql",[464,2308,603],{"class":487},[464,2310,722],{"class":470},[464,2312,725],{"class":487},[464,2314,455],{"class":470},[464,2316,730],{"class":470},[464,2318,733],{"class":480},[464,2320,606],{"class":470},[464,2322,738],{"class":470},[464,2324,614],{"class":487},[464,2326,1806],{"class":470},[464,2328,2329],{"class":1717},"    \u002F\u002Fmake assertions with chai\n",[464,2331,2333,2335,2337],{"class":466,"line":2332},39,[464,2334,2120],{"class":470},[464,2336,614],{"class":487},[464,2338,617],{"class":470},[464,2340,2342],{"class":466,"line":2341},40,[464,2343,2160],{"class":470},[464,2345,2347,2349,2352,2354,2356,2358,2360],{"class":466,"line":2346},41,[464,2348,1213],{"class":470},[464,2350,2351],{"class":487},"another test",[464,2353,606],{"class":470},[464,2355,455],{"class":470},[464,2357,666],{"class":588},[464,2359,1225],{"class":470},[464,2361,683],{"class":470},[464,2363,2365,2367,2369],{"class":466,"line":2364},42,[464,2366,2140],{"class":1844},[464,2368,1831],{"class":599},[464,2370,2371],{"class":487},"()\n",[464,2373,2375,2377,2379,2381,2383,2385,2387],{"class":466,"line":2374},43,[464,2376,2239],{"class":470},[464,2378,651],{"class":599},[464,2380,603],{"class":487},[464,2382,606],{"class":470},[464,2384,658],{"class":480},[464,2386,606],{"class":470},[464,2388,2389],{"class":487},")\n",[464,2391,2393,2395,2397,2399,2401,2403,2405,2407],{"class":466,"line":2392},44,[464,2394,2239],{"class":470},[464,2396,2263],{"class":599},[464,2398,603],{"class":487},[464,2400,1133],{"class":588},[464,2402,669],{"class":470},[464,2404,2272],{"class":672},[464,2406,614],{"class":470},[464,2408,683],{"class":470},[464,2410,2412,2414,2416,2418,2420,2422,2424,2426,2428,2430,2432,2434,2436,2438,2440,2442,2444,2446,2448,2450],{"class":466,"line":2411},45,[464,2413,2286],{"class":599},[464,2415,603],{"class":487},[464,2417,2272],{"class":592},[464,2419,648],{"class":470},[464,2421,2295],{"class":592},[464,2423,614],{"class":487},[464,2425,648],{"class":470},[464,2427,1248],{"class":592},[464,2429,648],{"class":470},[464,2431,2306],{"class":599},[464,2433,603],{"class":487},[464,2435,722],{"class":470},[464,2437,725],{"class":487},[464,2439,455],{"class":470},[464,2441,730],{"class":470},[464,2443,733],{"class":480},[464,2445,606],{"class":470},[464,2447,738],{"class":470},[464,2449,614],{"class":487},[464,2451,617],{"class":470},[464,2453,2455,2457,2459],{"class":466,"line":2454},46,[464,2456,2120],{"class":470},[464,2458,614],{"class":487},[464,2460,617],{"class":470},[464,2462,2464],{"class":466,"line":2463},47,[464,2465,1270],{"class":470},[464,2467,2469,2471,2473],{"class":466,"line":2468},48,[464,2470,1013],{"class":470},[464,2472,614],{"class":487},[464,2474,617],{"class":470},[464,2476,2478,2480,2482],{"class":466,"line":2477},49,[464,2479,738],{"class":470},[464,2481,614],{"class":592},[464,2483,617],{"class":470},[419,2485,2486],{},"and it requires following dependencies:",[439,2488,2491],{"className":2489,"code":2490,"language":444},[442],"npm install chai chai-http q portfinder --save-dev\n",[446,2492,2490],{"__ignoreMap":448},[431,2494,2496],{"id":2495},"explanation","Explanation",[546,2498,2500],{"id":2499},"dependencies","Dependencies",[1578,2502,2503,2509,2517,2520],{},[1581,2504,2505,2506],{},"chai - is an assertion library that allows to ensure some preconditions, like ",[446,2507,2508],{},"request body must equals json: {status: 'ok'}",[1581,2510,2511,2512],{},"chai-http - is a plugin for chai that allows to construct and handles HTTP calls, for example making GET call to ",[2513,2514,902],"a",{"href":902,"rel":2515},[2516],"nofollow",[1581,2518,2519],{},"q - is a library that allows working with promises in NodeJS application, which allows to work with asynhronous tests",[1581,2521,2522],{},"portfinder - is a simple tool to find an open port or domain socket on the current machine",[546,2524,2526],{"id":2525},"lifecycle","Lifecycle",[419,2528,2529],{},"When Intern tests are executed, the test system follows a specific lifecycle:",[419,2531,2532],{},"For each registered root suite:",[1578,2534,2535,2541,2557],{},[1581,2536,2537,2538,2540],{},"The ",[446,2539,1899],{}," method of the suite is called, if it exists",[1581,2542,2543,2544],{},"For each test within the suite:\n",[1578,2545,2546,2552],{},[1581,2547,2537,2548,2551],{},[446,2549,2550],{},"beforeEach"," method of the suite is called, if it exists\n*  The test function is called",[1581,2553,2537,2554,2540],{},[446,2555,2556],{},"afterEach",[1581,2558,2537,2559,2540],{},[446,2560,2168],{},[419,2562,2563,2564,2566,2567,648],{},"In order to start server once for all tests and close it on the end of the suite we will start it in ",[446,2565,1899],{}," method and shut it down in ",[446,2568,2168],{},[419,2570,2571,2572],{},"Source: ",[2513,2573,2574],{"href":2574,"rel":2575},"https:\u002F\u002Ftheintern.github.io\u002Fintern\u002F#test-lifecycle",[2516],[546,2577,2579],{"id":2578},"asynchronous-tests","Asynchronous tests",[419,2581,2582],{},"Most of the testing will be asynchronous, for example all HTTP calls are asynchronous, server will start in asynchronous and also finding free port is asynchronous. Intern support two mechanisms of handling asynchronous tests:",[1578,2584,2585,2591],{},[1581,2586,2587,2588],{},"Using ",[446,2589,2590],{},"this.async()",[1581,2592,2593],{},"Promises",[419,2595,2596],{},"First method is very simple, but doesn't work in lifecycle methods, and looks disgusting. This way is documented very well in the Intern guide so I won't go this way.\nThe benefits with promises are:",[1578,2598,2599,2605,2608,2611],{},[1581,2600,2601,2602,2604],{},"They are supported in tests and also in lifecycle methods. If simple tests doesn't require to handle asynchronous methods in for example ",[446,2603,1899],{}," method you don't need go with promises. As we will start server we need to stick with promises.",[1581,2606,2607],{},"They looks much more better, and I mean they are more easy to write so also maintain.",[1581,2609,2610],{},"Soon they will become standard",[1581,2612,2613],{},"Easy to use in Intern test",[419,2615,2616,2617,2619,2620,2622,2623,2626,2627,2629],{},"Promise is not supported out of the box, and we need to deliver it with one of many existing libraries. In ths case we will use ",[446,2618,1949],{}," library.\nPromise interface from ",[446,2621,1949],{}," needs to be registred with ",[446,2624,2625],{},"chai-http"," in order to support ",[446,2628,2263],{}," method which returns promise.",[419,2631,2632,2633,2636],{},"To make test to be asynchronous with promise, the only thing to do is to return promise. This is why we return ",[446,2634,2635],{},".then"," in the test.",[419,2638,2571,2639],{},[2513,2640,2641],{"href":2641,"rel":2642},"https:\u002F\u002Ftheintern.github.io\u002Fintern\u002F#async-tests",[2516],[546,2644,2646],{"id":2645},"improvements","Improvements",[419,2648,2649,2650,2653],{},"Intern allows to execute suites simultaneously. If we start many end to end suites it might turn out that we are using same port. To detect free port and use it I use ",[446,2651,2652],{},"portfinder"," library.",[414,2655,1573],{"id":2656},"summary-1",[419,2658,2659],{},"In this post I demonstrated how to set up testing environment for NodeJS application using Intern framework and Grunt task runner. Then I've modified simple unit tests to run local server with endpoints which needs to be tested. After that we are able to call them and assure that responses are correct. Please notice that the speed of set up the whole server doesn't differ so much from unit tests.",[419,2661,2662,2663],{},"Source code: ",[2513,2664,2665],{"href":2665,"rel":2666},"https:\u002F\u002Fgithub.com\u002Fkospiotr\u002Fhello-js\u002Ftree\u002Fmaster\u002Fintern-end-to-end-tests",[2516],[2668,2669,2670],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}",{"title":448,"searchDepth":474,"depth":474,"links":2672},[2673,2674,2678,2679,2683,2687,2688,2692,2693,2694],{"id":433,"depth":474,"text":434},{"id":543,"depth":474,"text":544,"children":2675},[2676,2677],{"id":548,"depth":501,"text":549},{"id":558,"depth":501,"text":559},{"id":801,"depth":474,"text":802},{"id":936,"depth":474,"text":937,"children":2680},[2681,2682],{"id":943,"depth":501,"text":944},{"id":965,"depth":501,"text":966},{"id":1066,"depth":474,"text":1067,"children":2684},[2685,2686],{"id":1070,"depth":501,"text":1071},{"id":1083,"depth":501,"text":1084},{"id":1105,"depth":474,"text":1106},{"id":1291,"depth":474,"text":1292,"children":2689},[2690,2691],{"id":1298,"depth":501,"text":1299},{"id":1550,"depth":501,"text":1551},{"id":1572,"depth":474,"text":1573},{"id":1623,"depth":474,"text":1624},{"id":2495,"depth":474,"text":2496,"children":2695},[2696,2697,2698,2699],{"id":2499,"depth":501,"text":2500},{"id":2525,"depth":501,"text":2526},{"id":2578,"depth":501,"text":2579},{"id":2645,"depth":501,"text":2646},"2015-03-03","Testing REST with Intern","md",{"layout":2704},"post","\u002Fblog\u002F2015-03-03-end-to-end-tests-with-intern",{"title":408,"description":2701},"2.blog\u002F2015-03-03-end-to-end-tests-with-intern","EbizDXNo7BfFtvptRgfyij8TqQafLtiDFQHUv5xO7Sc",[2710,2715],{"title":2711,"path":2712,"stem":2713,"description":2714,"children":-1},"Testing Node applications with Intern framework","\u002Fblog\u002F2015-03-01-unit-tests-with-intern","2.blog\u002F2015-03-01-unit-tests-with-intern","Unit tests in TDD with Intern",{"title":2716,"path":2717,"stem":2718,"description":2719,"children":-1},"Testing with Intern","\u002Fblog\u002F2015-04-06-testing_with_intern","2.blog\u002F2015-04-06-testing_with_intern","Quality assurance with Intern",1788257054937]