<?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: almantas88</title>
    <description>The latest articles on DEV Community by almantas88 (@almantas88).</description>
    <link>https://dev.to/almantas88</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%2F373435%2Fa35f1401-634d-4520-81ac-6618db922f95.png</url>
      <title>DEV Community: almantas88</title>
      <link>https://dev.to/almantas88</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/almantas88"/>
    <language>en</language>
    <item>
      <title>How to do Firebase, NodeJS, ExpressJS API endpoint unit tests?
</title>
      <dc:creator>almantas88</dc:creator>
      <pubDate>Fri, 19 Feb 2021 14:47:04 +0000</pubDate>
      <link>https://dev.to/almantas88/how-to-do-firebase-nodejs-expressjs-api-endpoint-unit-tests-3eol</link>
      <guid>https://dev.to/almantas88/how-to-do-firebase-nodejs-expressjs-api-endpoint-unit-tests-3eol</guid>
      <description>&lt;p&gt;I'm lost, I have been searching for good resources but I can't find any. How to do unit testing for a back-end NodeJS, ExpressJS, Firestore, RESTful app? What tools to use? How to mock data? I don't want to have a test database for testing, I want to mock data. Can any one help me?&lt;/p&gt;

&lt;p&gt;Example of an endpoint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;router.post("/color", async (request, response) =&amp;gt; { 

    if(Object.keys(request.body).length === 0) return response.status(406).send("Ups... There was missing data.");

    try {
        await db.collection('Colors').add({
            realColor: request.body.realColor,
            colorMap: request.body.colorMap
        });
        response.status(201).send("Success! A color was creted!");
    }
    catch (error) {
        console.log(error);
        response.status(400).send("Ups... A color was NOT creted!");
    }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>help</category>
      <category>node</category>
      <category>javascript</category>
      <category>unittesting</category>
    </item>
    <item>
      <title>How to convert from JSON with references to a JSON tree</title>
      <dc:creator>almantas88</dc:creator>
      <pubDate>Wed, 10 Feb 2021 15:30:36 +0000</pubDate>
      <link>https://dev.to/almantas88/how-to-convert-from-json-with-references-to-a-json-tree-16c8</link>
      <guid>https://dev.to/almantas88/how-to-convert-from-json-with-references-to-a-json-tree-16c8</guid>
      <description>&lt;p&gt;How to convert this data: &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zhgPh7oS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tm3sx37w2qm3c3u4jsah.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zhgPh7oS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tm3sx37w2qm3c3u4jsah.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To this data:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CYmvb6SW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1agfhtpvvfytbeajug4d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CYmvb6SW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1agfhtpvvfytbeajug4d.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>help</category>
      <category>question</category>
      <category>node</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How to  make JSON file to tree structure</title>
      <dc:creator>almantas88</dc:creator>
      <pubDate>Wed, 10 Feb 2021 14:34:13 +0000</pubDate>
      <link>https://dev.to/almantas88/how-to-make-json-file-to-tree-structure-bed</link>
      <guid>https://dev.to/almantas88/how-to-make-json-file-to-tree-structure-bed</guid>
      <description>&lt;p&gt;I give front end data from back-end (Node.js and Firebase/firestore)&lt;br&gt;
Data: &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5XSidLSP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3vwwvh1yhbg4g5n00rtt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5XSidLSP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3vwwvh1yhbg4g5n00rtt.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How does front-end (Vue.js) render this data as a tree, like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qWQYX_SA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e6z6a8zjyg2clvpllxyw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qWQYX_SA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e6z6a8zjyg2clvpllxyw.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>question</category>
      <category>help</category>
    </item>
    <item>
      <title>I got my internship!</title>
      <dc:creator>almantas88</dc:creator>
      <pubDate>Tue, 26 Jan 2021 18:16:53 +0000</pubDate>
      <link>https://dev.to/almantas88/i-got-my-internship-503f</link>
      <guid>https://dev.to/almantas88/i-got-my-internship-503f</guid>
      <description>&lt;p&gt;I got my first internship as a NodeJs programmer! Should I be afraid? Is it okay if i ask a lot of questions?&lt;/p&gt;

</description>
      <category>help</category>
      <category>question</category>
      <category>internship</category>
    </item>
  </channel>
</rss>
