FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
astro-api-nodejs-client/src/testing/paths.ts at master · astrologyapi/astro-api-nodejs-client · GitHub
astrologyapi
/
astro-api-nodejs-client
Public
Notifications
You must be signed in to change notification settings
Fork
9
Star
9
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
astro-api-nodejs-client
/
src
/
testing
/
paths.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (31 loc) · 1.4 KB
Breadcrumbs
astro-api-nodejs-client
/
src
/
testing
/
paths.ts
Copy path
File metadata and controls
36 lines (31 loc) · 1.4 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import
{
mkdir
,
writeFile
}
from
"node:fs/promises"
;
import
{
dirname
,
join
}
from
"node:path"
;
export
const
ROOT_DIR
=
process
.
cwd
(
)
;
export
const
SRC_DIR
=
join
(
ROOT_DIR
,
"src"
)
;
export
const
MOCK_DIR
=
join
(
ROOT_DIR
,
"mock"
)
;
export
const
TESTING_PLAN_PATH
=
join
(
MOCK_DIR
,
"testing-implementation-plan.md"
)
;
export
const
CATALOG_DIR
=
join
(
MOCK_DIR
,
"catalog"
)
;
export
const
DOCS_DIR
=
join
(
MOCK_DIR
,
"docs"
)
;
export
const
RESULTS_DIR
=
join
(
MOCK_DIR
,
"results"
)
;
export
const
TEST_DATA_DIR
=
join
(
MOCK_DIR
,
"test-data"
)
;
export
const
POSTMAN_COLLECTION_FILES
=
[
"vedic_astrology_API_collection_postman_collection.json"
,
"vedic_astrology_pdf_API_collection_postman_collection.json"
,
"western_astrology_API_collection_postman_collection.json"
,
"western_astrology_pdf_API_collection_postman_collection.json"
,
]
;
export
async
function
ensureTestingDirectories
(
)
:
Promise
<
void
>
{
await
Promise
.
all
(
[
mkdir
(
CATALOG_DIR
,
{
recursive
:
true
}
)
,
mkdir
(
DOCS_DIR
,
{
recursive
:
true
}
)
,
mkdir
(
RESULTS_DIR
,
{
recursive
:
true
}
)
,
mkdir
(
TEST_DATA_DIR
,
{
recursive
:
true
}
)
,
]
)
;
}
export
async
function
writeTextFile
(
path
:
string
,
content
:
string
)
:
Promise
<
void
>
{
await
mkdir
(
dirname
(
path
)
,
{
recursive
:
true
}
)
;
await
writeFile
(
path
,
content
,
"utf8"
)
;
}
export
async
function
writeJsonFile
(
path
:
string
,
value
:
unknown
)
:
Promise
<
void
>
{
await
writeTextFile
(
path
,
`
${
JSON
.
stringify
(
value
,
null
,
2
)
}
\n`
)
;
}
Back
|
FazBrowse Home
|
New Git URL