Skip to content

Instantly share code, notes, and snippets.

View kostysh's full-sized avatar

Kostiantyn Smyrnov kostysh

View GitHub Profile
@kostysh
kostysh / promt.unit-tests.md
Last active March 22, 2024 02:46
ChatGPT prompt for unit tests writing

I want you to act as a Senior full stack Typescript developer. Once I provide the TypeScript code, your task is to develop a comprehensive suite of unit tests for a provided TypeScript codebase. Follow these guidelines for an effective testing process:

  1. Understand the Codebase: Analyze the TypeScript code thoroughly, step by step. Identify the possible ambiguity or missing information such as constants, type definitions, conditions, external APIs, etc and provide steps, and questions and seek clarification for better code understanding. Only proceed to the next step once you have analyzed the codebase fully.

  2. Testing framework: For this task, use an abstract testing framework instead of known frameworks such as chai, jest, etc., remembering that the principles of unit testing apply regardless of the specific tools.

  3. Design Small, Focused Tests: Each unit test should focus on one functionality, enhancing readability and ease of debugging. Ensure each test is isolated and does not depe

@kostysh
kostysh / derbysoft-proxy.yaml
Last active August 12, 2022 13:21
Derbysoft Proxy swagger doc
openapi: 3.0.1
info:
title: The Derbysoft Proxy
description: "This is the interface documentation for the REST api interface with the Winding Tree Aggregator"
contact:
email: dev@windingtree.com
license:
name: Apache License
url: http://www.apache.org/licenses/LICENSE-2.0.html
@kostysh
kostysh / org.json
Last active August 20, 2020 18:00
test10
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://windingtree.com/ns/orgid/v1"
],
"id": "did:orgid:0x39a84b5b2ac9b2cb83eb171a5adb1489777902a4919ea209c46e795cf7f9ce3e",
"created": "2020-08-18T12:06:34.867Z",
"legalEntity": {
"contacts": [
{
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://windingtree.com/ns/orgid/v1"
],
"id": "did:orgid:0x05d4899a035242d1b5a841ef00c6d44dbd628b4fcbffbd5235a1c69ece8ad95e",
"created": "2020-08-07T19:28:11.458Z",
"legalEntity": {
"contacts": [
{
@kostysh
kostysh / zzz.json
Last active September 1, 2020 22:44
JSON for ZZZ
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://windingtree.com/ns/orgid/v1"
],
"id": "did:orgid:0xa67d49bd249446a4fb64abb03613e5519e0d807c2e4d9737fa1c20d591354334",
"created": "2020-08-28T19:26:35.324Z",
"legalEntity": {
"contacts": [
{
@kostysh
kostysh / orgid.json
Last active August 7, 2020 19:16
ZZZ3
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://windingtree.com/ns/orgid/v1"
],
"id": "did:orgid:0x20dafcec077089e1acb56bbc2c2d3f3fbd4e6a7125d20c2e1b9a99164142d9cb",
"created": "2020-06-29T20:02:26.472Z",
"legalEntity": {
"contacts": [
{
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://windingtree.com/ns/orgid/v1"
],
"id": "did:orgid:0x66fa38e6d9ac7532ebb669af6250e7e1496b3907e4a0d4c81c1d88da90f33628",
"created": "2020-06-29T19:40:24.800Z",
"legalEntity": {
"contacts": [
{
@kostysh
kostysh / orgid.json
Last active June 29, 2020 12:42
New TEST
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://windingtree.com/ns/orgid/v1"
],
"id": "did:orgid:0x8033c591d25a0581b3670fa20c38f579b102dc1758c355317ca7aae75286605a",
"created": "2020-06-29T12:40:29.614Z",
"legalEntity": {
"contacts": [
{
@kostysh
kostysh / orgid.json
Created June 24, 2020 17:19
New Simard ORG.JSON
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://windingtree.com/ns/orgid/v1"
],
"id": "did:orgid:0x349aa79c56cdfe48e1330b434e2e7ec6ebc3303ed0d42aa4a98d9ef8dda2991a",
"created": "2019-01-01T13:10:02.251Z",
"updated": "2020-05-21T13:20:06.398Z",
"publicKey": [
{
@kostysh
kostysh / 0x0f0e8631db0fd385fc71e0d197b533547595a8eddf92d14b3fa7a63bfe330e7a.json
Last active June 17, 2020 18:15
0x0f0e8631db0fd385fc71e0d197b533547595a8eddf92d14b3fa7a63bfe330e7a.json
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://windingtree.com/ns/orgid/v1"
],
"id": "did:orgid:0x0f0e8631db0fd385fc71e0d197b533547595a8eddf92d14b3fa7a63bfe330e7a",
"created": "2020-04-01T09:44:07.048Z",
"legalEntity": {
"legalType": "private entrepreneur",
"legalName": "GitHub, Inc.",