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
9c0bb0fb
Commit
9c0bb0fb
authored
Jan 19, 2021
by
aniket-engg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test for custom runs
parent
f0721bd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
testRunner.cli.spec.ts
libs/remix-tests/tests/testRunner.cli.spec.ts
+15
-0
No files found.
libs/remix-tests/tests/testRunner.cli.spec.ts
View file @
9c0bb0fb
...
...
@@ -90,5 +90,19 @@ Commands:
// macth fail test details
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/error: okFailTest fails/
)
})
test
(
'remix-tests running a test file by enabling optimization and setting runs'
,
()
=>
{
const
res
=
spawnSync
(
executablePath
,
[
'--optimize'
,
'true'
,
'--runs'
,
'300'
,
resolve
(
__dirname
+
'/examples_0/assert_ok_test.sol'
)])
// match initial lines
expect
(
res
.
stdout
.
toString
().
trim
().
includes
(
'Optimization is enabled'
)).
toBeTruthy
()
expect
(
res
.
stdout
.
toString
().
trim
().
includes
(
'Runs set to 300'
)).
toBeTruthy
()
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/:: Running remix-tests - Unit testing for solidity ::/
)
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/creation of library remix_tests.sol:Assert pending.../
)
// match test result
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/Ok pass test/
)
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/Ok fail test/
)
// macth fail test details
expect
(
res
.
stdout
.
toString
().
trim
()).
toMatch
(
/error: okFailTest fails/
)
})
})
})
\ 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