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
625d074c
Commit
625d074c
authored
Nov 05, 2020
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a e2e test for optimization
parent
91b93525
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
compiler_api.test.ts
apps/remix-ide-e2e/src/tests/compiler_api.test.ts
+28
-0
No files found.
apps/remix-ide-e2e/src/tests/compiler_api.test.ts
View file @
625d074c
...
...
@@ -26,6 +26,14 @@ module.exports = {
.
journalChildIncludes
(
`"languageversion": "0.6.8+commit.0bbfe453"`
)
},
'Should compile using "compileWithParamaters" API with optimization On'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
addFile
(
'test_jsCompileWithOptimization.js'
,
{
content
:
jsCompileWithOptimization
})
.
executeScript
(
'remix.exeCurrent()'
)
.
pause
(
5000
)
.
journalChildIncludes
(
`\"optimizer\":{\"enabled\":true,\"runs\":300}`
)
},
'Should update the compiler configuration with "setCompilerConfig" API'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
addFile
(
'test_updateConfiguration.js'
,
{
content
:
updateConfiguration
})
...
...
@@ -84,6 +92,26 @@ const jsCompile = `(async () => {
const result = await remix.call('solidity', 'compileWithParameters', contract, params)
console.log('result ', result)
} catch (e) {
console.log(e.message)
}
})()`
const
jsCompileWithOptimization
=
`(async () => {
try {
const contract = {
"storage.sol": {content : \`
${
simpleContract
}
\` }
}
console.log('compile')
const params = {
optimize: true,
runs: 300,
evmVersion: null,
language: 'Solidity',
version: '0.6.8+commit.0bbfe453'
}
const result = await remix.call('solidity', 'compileWithParameters', contract, params)
console.log('result ', result)
} catch (e) {
console.log(e.message)
}
})()`
...
...
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