Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
b001cae5
Commit
b001cae5
authored
Jan 13, 2021
by
aniket-engg
Committed by
Aniket
Jan 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unit tests for remix-tests CLI usage
parent
0f2637b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
testRunner.cli.spec.ts
libs/remix-tests/tests/testRunner.cli.spec.ts
+21
-0
No files found.
libs/remix-tests/tests/testRunner.cli.spec.ts
0 → 100644
View file @
b001cae5
import
{
spawnSync
,
execSync
}
from
'child_process'
import
{
resolve
}
from
'path'
describe
(
'testRunner: remix-tests CLI'
,
()
=>
{
// remix-tests binary, after build, is used as executable
const
executablePath
=
resolve
(
__dirname
+
'/../../../dist/libs/remix-tests/bin/remix-tests'
)
const
result
=
spawnSync
(
'ls'
,
{
cwd
:
resolve
(
__dirname
+
'/../../../dist/libs/remix-tests'
)
})
if
(
result
)
{
const
dirContent
=
result
.
stdout
.
toString
()
// Install dependencies if 'node_modules' is not already present
if
(
!
dirContent
.
includes
(
'node_modules'
))
execSync
(
'npm install'
,
{
cwd
:
resolve
(
__dirname
+
'/../../../dist/libs/remix-tests'
)
})
}
describe
(
'test various CLI options'
,
()
=>
{
test
(
'remix-tests version'
,
()
=>
{
const
res
=
spawnSync
(
executablePath
,
[
'-V'
])
expect
(
res
.
stdout
.
toString
().
trim
()).
toBe
(
require
(
'../package.json'
).
version
)
})
})
})
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment