Add sol-compiler watch mode

This commit is contained in:
Leonid Logvinov
2018-12-19 14:11:08 +01:00
parent 8ddf925a8f
commit 657b698e1e
7 changed files with 88 additions and 7 deletions

View File

@@ -52,7 +52,7 @@ describe('Compiler utils', () => {
const source = await fsWrapper.readFileAsync(path, {
encoding: 'utf8',
});
const dependencies = parseDependencies({ source, path });
const dependencies = parseDependencies({ source, path, absolutePath: path });
const expectedDependencies = [
'zeppelin-solidity/contracts/token/ERC20/ERC20.sol',
'packages/sol-compiler/lib/test/fixtures/contracts/TokenTransferProxy.sol',
@@ -68,7 +68,7 @@ describe('Compiler utils', () => {
const source = await fsWrapper.readFileAsync(path, {
encoding: 'utf8',
});
expect(parseDependencies({ source, path })).to.be.deep.equal([
expect(parseDependencies({ source, path, absolutePath: path })).to.be.deep.equal([
'zeppelin-solidity/contracts/ownership/Ownable.sol',
'zeppelin-solidity/contracts/token/ERC20/ERC20.sol',
]);
@@ -77,7 +77,7 @@ describe('Compiler utils', () => {
it.skip('correctly parses commented out dependencies', async () => {
const path = '';
const source = `// import "./TokenTransferProxy.sol";`;
expect(parseDependencies({ path, source })).to.be.deep.equal([]);
expect(parseDependencies({ path, source, absolutePath: path })).to.be.deep.equal([]);
});
});
});