Merge branch 'master' into targets2

pull/5370/head
bunsenstraat 4 years ago committed by GitHub
commit f2dfabaeaf
  1. 8
      libs/remix-url-resolver/tests/test.ts

@ -59,7 +59,7 @@ describe('testRunner', () => {
// Test github import
describe('test getting github imports', () => {
const urlResolver = new RemixURLResolver()
const fileName: string = 'github.com/MathCody/solidity-examples/greeter/greeter.sol'
const fileName: string = 'github.com/ethential/solidity-examples/solidity-features-check/greeter.sol'
let results: object = {}
before(done => {
@ -78,8 +78,8 @@ describe('testRunner', () => {
})
it('should return contract content of given github path', () => {
const expt: object = {
cleanUrl: 'MathCody/solidity-examples/greeter/greeter.sol',
content: 'pragma solidity >=0.5.0 <0.6.0;\nimport \"../mortal/mortal.sol\";\n\ncontract Greeter is Mortal {\n /* Define variable greeting of the type string */\n string greeting;\n\n /* This runs when the contract is executed */\n constructor(string memory _greeting) public {\n greeting = _greeting;\n }\n\n /* Main function */\n function greet() public view returns (string memory) {\n return greeting;\n }\n}',
cleanUrl: 'ethential/solidity-examples/solidity-features-check/greeter.sol',
content: 'pragma solidity >=0.7.0;\nimport \"./mortal.sol\";\n// SPDX-License-Identifier: GPL-3.0\n\ncontract Greeter is Mortal {\n /* Define variable greeting of the type string */\n string greeting;\n\n /* This runs when the contract is executed */\n constructor(string memory _greeting) {\n greeting = _greeting;\n }\n\n /* Main function */\n function greet() public view returns (string memory) {\n return greeting;\n }\n}\n\n// 0x37aA58B2cE3Bb9576EEBCD51315070eA8806b7c4\n',
type: 'github'
}
assert.deepEqual(results, expt)
@ -268,6 +268,7 @@ describe('testRunner', () => {
})
// Test SWARM imports
/*
describe('test getting SWARM imports', () => {
const urlResolver = new RemixURLResolver()
const fileName = 'bzz-raw://a728627437140f2b0b46c1bcfb0de2126d18b40e9b61c3e31bd96abebf714619'
@ -297,6 +298,7 @@ describe('testRunner', () => {
assert.deepEqual(results, expt)
})
})
*/
})
})
})

Loading…
Cancel
Save