Open in app

Sign In

Write

Sign In

Pavel Saman
Pavel Saman

81 Followers

Home

About

Jan 21

Scopes and Variable Shadowing in JS

If I give you the following example code: const age = 30; function func() { const age = 31; console.log(age); for(let i = 0; i < 2; i++) { const age = 32; console.log(age); } } func(); console.log(age); What will be printed to the console? Try to answer before you…

JavaScript

2 min read

JavaScript

2 min read


Jan 19

Postman — Covert String to base64

Sometimes you need to get base64 encoded string inside Postman. Or decode a base64 encoded string. I think two easy ways are: const base64encoded = btoa('stringToEncode'); // c3RyaW5nVG9FbmNvZGU= const decoded = atob(base64encoded); // stringToEncode Another way to encode might be: Buffer.from('stringToEncode').toString('base64'); // c3RyaW5nVG9FbmNvZGU=

Base64

1 min read

Base64

1 min read


Jan 18

Get All NPM Scripts from package.json

When working with package.json files, I often need to get all scripts to find the one I want to run. To do that, I can either open the file and find the script I need, which is slow, or I can use jq to get all the NPM scripts right…

NPM

1 min read

NPM

1 min read


Jan 2

Send Mocha Test Result to New Relic

I’ve talked about Mocha test results a few times — in Mocha JSON Report(er) and Cache Mocha Test Results And Run Only Failed Test Files On Re-runs. Today I’ll add one more piece — sending Mocha test results to New Relic. New Relic is a monitoring platform that can gather…

Mocha

3 min read

Send Mocha Test Result to New Relic
Send Mocha Test Result to New Relic
Mocha

3 min read


Dec 26, 2022

Cache Mocha Test Results And Run Only Failed Test Files On Re-runs

Mocha can generate a JSON file with test results. It might be sometimes useful to find all failed test files, e.g. when I want to re-run only tests from such test files. Running all automated tests might be time-consuming, so you might want to look for various ways to run…

Mocha

5 min read

Cache Mocha Test Results And Run Only Failed Test Files On Re-runs
Cache Mocha Test Results And Run Only Failed Test Files On Re-runs
Mocha

5 min read


Dec 25, 2022

Keep Git Authors in Order With Gitmailmap

Gitmailmap is a good way to keep the git authors in order. The official git documentation says: If the file .mailmap exists at the toplevel of the repository, or at the location pointed to by the mailmap.file or mailmap.blob configuration options (see git-config[1]), it is used to map author and…

Git

2 min read

Git

2 min read


Dec 24, 2022

Channel Notifications Are Not Always Useful

I see a lot of content online about creating channel notification about the results of automated checks. I don’t think this is as useful as such posts sometimes try to portray. What I have experienced is that there’s usually too many (Slack) channels that it is impossible and ineffective to…

Data

1 min read

Data

1 min read


Dec 23, 2022

End to End is Usually Not End to End

What? Why? I’ve recently noticed that we kind of use end-to-end for almost anything that involves more than one tiny part of the system. That is not completely wrong of course, but I find it misleading anyway, I’ll try to explain why. My current situation is something along these points: …

End To End Testing

3 min read

End To End Testing

3 min read


Dec 22, 2022

Year 2022 on Medium

This is a short summary of the year with this blog. I set up my blog here in November 2021 but created most of my content in 2022. Let’s summarize the year a bit. It turns out that I can also filter my posts by the number of reads, here…

Year 2022

2 min read

Year 2022 on Medium
Year 2022 on Medium
Year 2022

2 min read


Dec 21, 2022

GitHub Actions — Output Parameters

GitHub has changed how output parameters should be written, let’s see the new syntax. I’ve done a lot of work on CI/CD pipelines over last couple of months and this changed at some point. GitHub then started posting deprecation warning messages into Annotations on the Summary page. …

Github

2 min read

Github

2 min read

Pavel Saman

Pavel Saman

81 Followers

Tester

Following
  • Melissa Fisher

    Melissa Fisher

  • Andrey Enin

    Andrey Enin

  • Scott H. Young

    Scott H. Young

  • Ryan Craven

    Ryan Craven

  • Pavol Luptak

    Pavol Luptak

See all (16)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech