diff --git a/zokrates_js/tests/tests.js b/zokrates_js/tests/tests.js index edcfb9fc..d235e3c4 100644 --- a/zokrates_js/tests/tests.js +++ b/zokrates_js/tests/tests.js @@ -25,7 +25,12 @@ describe('tests', function() { it('should resolve stdlib module', function() { assert.doesNotThrow(() => { - const code = 'import "hashes/sha256/512bit" as sha256\ndef main() -> (): return'; + const code = ` + import "hashes/sha256/512bit" as sha256 + import "ecc/edwardsAdd" as edwardsAdd + def main() -> (): + return + `; this.zokrates.compile(code, "main"); }) }); diff --git a/zokrates_js/wrapper.js b/zokrates_js/wrapper.js index e163c128..7765e0c2 100644 --- a/zokrates_js/wrapper.js +++ b/zokrates_js/wrapper.js @@ -1,4 +1,7 @@ const getAbsolutePath = (basePath, relativePath) => { + if (relativePath[0] !== '.') { + return relativePath; + } var stack = basePath.split('/'); var chunks = relativePath.split('/'); stack.pop();