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
19c976be
Commit
19c976be
authored
Jan 05, 2021
by
aniket-engg
Committed by
Aniket
Jan 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test github imports for branch
parent
0f8c6c62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
test.ts
libs/remix-url-resolver/tests/test.ts
+30
-0
No files found.
libs/remix-url-resolver/tests/test.ts
View file @
19c976be
...
@@ -86,6 +86,36 @@ describe('testRunner', () => {
...
@@ -86,6 +86,36 @@ describe('testRunner', () => {
})
})
})
})
// Test github import for specific branch
describe
(
'test getting github imports for specific branch'
,
()
=>
{
const
urlResolver
=
new
RemixURLResolver
()
const
fileName
:
string
=
'https://github.com/ethereum/remix-project/blob/remix_beta/libs/remix-url-resolver/tests/example_1/greeter.sol'
let
results
:
object
=
{}
before
(
done
=>
{
urlResolver
.
resolve
(
fileName
)
.
then
((
sources
:
object
)
=>
{
results
=
sources
done
()
})
.
catch
((
e
:
Error
)
=>
{
throw
e
})
})
it
(
'should have 3 items'
,
()
=>
{
assert
.
equal
(
Object
.
keys
(
results
).
length
,
3
)
})
it
(
'should return contract content of given github path'
,
()
=>
{
const
expt
:
object
=
{
cleanUrl
:
'ethereum/remix-project/libs/remix-url-resolver/tests/example_1/greeter.sol'
,
content
:
fs
.
readFileSync
(
__dirname
+
'/example_1/greeter.sol'
,
{
encoding
:
'utf8'
})
+
'
\
n'
,
type
:
'github'
}
assert
.
deepEqual
(
results
,
expt
)
})
})
// Test github import for specific tag
// Test github import for specific tag
describe
(
'test getting github imports for specific tag'
,
()
=>
{
describe
(
'test getting github imports for specific tag'
,
()
=>
{
const
urlResolver
=
new
RemixURLResolver
()
const
urlResolver
=
new
RemixURLResolver
()
...
...
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