Commit aba399e1 authored by Iuri Matias's avatar Iuri Matias Committed by yann300

find import for remix-tests

parent ae515bd3
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
var base64 = require('js-base64').Base64 var base64 = require('js-base64').Base64
var swarmgw = require('swarmgw') var swarmgw = require('swarmgw')
var request = require('request') var request = require('request')
var assertLibCode = require('remix-tests').assertLibCode
module.exports = class CompilerImports { module.exports = class CompilerImports {
constructor () { constructor () {
...@@ -70,6 +71,9 @@ module.exports = class CompilerImports { ...@@ -70,6 +71,9 @@ module.exports = class CompilerImports {
import (url, loadingCb, cb) { import (url, loadingCb, cb) {
var self = this var self = this
if (url === 'remix_tests.sol') {
return cb(null, assertLibCode, 'remix_tests.sol', 'remix_tests', 'remix_tests.sol')
}
var imported = this.previouslyHandled[url] var imported = this.previouslyHandled[url]
if (imported) { if (imported) {
return cb(null, imported.content, imported.cleanUrl, imported.type, url) return cb(null, imported.content, imported.cleanUrl, imported.type, url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment