<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Onwubiko Chibuike</title>
    <description>The latest articles on DEV Community by Onwubiko Chibuike (@princecurie).</description>
    <link>https://dev.to/princecurie</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F83043%2F55469518-9ac9-4c9e-aa54-4eed84358ca4.jpg</url>
      <title>DEV Community: Onwubiko Chibuike</title>
      <link>https://dev.to/princecurie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/princecurie"/>
    <language>en</language>
    <item>
      <title>Writing Unit Test</title>
      <dc:creator>Onwubiko Chibuike</dc:creator>
      <pubDate>Tue, 09 Jun 2020 18:45:07 +0000</pubDate>
      <link>https://dev.to/princecurie/writing-unit-test-1kgl</link>
      <guid>https://dev.to/princecurie/writing-unit-test-1kgl</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fhYHu3EE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dioujm2o4ngx2riczvku.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fhYHu3EE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dioujm2o4ngx2riczvku.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Photo by Ferenc Almasi on Unsplash&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a unit test?
&lt;/h2&gt;

&lt;p&gt;A unit test is a check to ensure that a function works as expected. It is written during the software development process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the unit test?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Makes it easier to add a new feature or delete a feature.&lt;/li&gt;
&lt;li&gt;The developer refactors with more confidence.&lt;/li&gt;
&lt;li&gt;Bugs are found earlier during development.&lt;/li&gt;
&lt;li&gt;Makes debugging easier.&lt;/li&gt;
&lt;li&gt;It improves code quality.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tips to keep in mind when writing unit test
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The function/module should contain all input(s) needed as parameters.&lt;/li&gt;
&lt;li&gt;The function/module should return an output.&lt;/li&gt;
&lt;li&gt;Do not test any external module, library or function for example the database, an API etc.
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>testing</category>
      <category>beginners</category>
      <category>unit</category>
    </item>
    <item>
      <title>A Foodie's Guide To HTTP Response Status Code</title>
      <dc:creator>Onwubiko Chibuike</dc:creator>
      <pubDate>Sun, 28 Jul 2019 20:55:48 +0000</pubDate>
      <link>https://dev.to/princecurie/a-foodie-s-guide-to-http-response-status-code-3bdl</link>
      <guid>https://dev.to/princecurie/a-foodie-s-guide-to-http-response-status-code-3bdl</guid>
      <description>&lt;p&gt;For a foodie HTTP response status code can be easily understood if it is related to the one he/she loves, you guessed right, food. So today we will try to relate the meaning of common status codes to events relating to food.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is HTTP response status code?
&lt;/h3&gt;

&lt;p&gt;This is the response sent back by the server describing how a request was handled. &lt;/p&gt;

&lt;h3&gt;
  
  
  Success
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;200&lt;/code&gt; success:&lt;/strong&gt; To a Foodie walking into a restaurant, ordering a meal and getting it, is a definition of what success means, and that is what this status code stands for making a request and also getting the adequate response.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;201 created:&lt;/code&gt;&lt;/strong&gt; A foodie returns with groceries, gets their meal prepared for them or prepares it themselves. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;204&lt;/code&gt; no content:&lt;/strong&gt; A foodie walks into a restaurant and orders a meal, minutes later the waiter returns smiling, serves you the meal and then you discover that the plate is empty.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Client Error Responses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;400&lt;/code&gt; bad request:&lt;/strong&gt; A foodie walks into a vegan store and request for beef.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;401&lt;/code&gt; unauthorized:&lt;/strong&gt; A foodie tries to get into a food event without an invite.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;403&lt;/code&gt; forbidden:&lt;/strong&gt; A foodie attends a food event on a regular ticket and tries to get seated in a VIP position.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;404&lt;/code&gt; not found:&lt;/strong&gt; A foodie wants to eat but cannot find their food.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Server Error Responses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;500&lt;/code&gt; internal server error:&lt;/strong&gt; This occurs when a foodie sees a meal he/she can not come to terms with eating.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>http</category>
    </item>
    <item>
      <title>How do I test protected websocket channels with tools like postman?</title>
      <dc:creator>Onwubiko Chibuike</dc:creator>
      <pubDate>Thu, 25 Jul 2019 10:34:22 +0000</pubDate>
      <link>https://dev.to/princecurie/how-do-i-test-protected-websocket-clients-with-tools-like-postman-33k0</link>
      <guid>https://dev.to/princecurie/how-do-i-test-protected-websocket-clients-with-tools-like-postman-33k0</guid>
      <description>&lt;p&gt;I have been working on real time messaging using websocket, I have some channels protected but i cannot access them it keeps returning invalid jwt token, How do I pass in the token while using tools like &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;smart websocket client&lt;/li&gt;
&lt;li&gt;advanced rest client&lt;/li&gt;
&lt;li&gt;simple web socket client&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am using adonisJs on the backend.&lt;/p&gt;

</description>
      <category>websocket</category>
      <category>jwt</category>
      <category>node</category>
      <category>adonisjs</category>
    </item>
  </channel>
</rss>
