From aba399e12c4b8caf7b477f99c8517235b348f5bc Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 30 May 2018 18:09:11 -0400 Subject: [PATCH] find import for remix-tests --- src/app/compiler/compiler-imports.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/compiler/compiler-imports.js b/src/app/compiler/compiler-imports.js index e306ac9fee..a832f843d8 100644 --- a/src/app/compiler/compiler-imports.js +++ b/src/app/compiler/compiler-imports.js @@ -2,6 +2,7 @@ var base64 = require('js-base64').Base64 var swarmgw = require('swarmgw') var request = require('request') +var assertLibCode = require('remix-tests').assertLibCode module.exports = class CompilerImports { constructor () { @@ -70,6 +71,9 @@ module.exports = class CompilerImports { import (url, loadingCb, cb) { 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] if (imported) { return cb(null, imported.content, imported.cleanUrl, imported.type, url)