aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/test/compiler_utils_test.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-04-10 19:44:15 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-04-12 18:50:38 +0800
commitf2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1 (patch)
tree98ff3c9137cdce1a44b65dc7dc89a7a72f70b9de /packages/deployer/test/compiler_utils_test.ts
parented0c64fdcf5c180107f54ad916c11c4901a4c01c (diff)
downloaddexon-0x-contracts-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.tar
dexon-0x-contracts-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.tar.gz
dexon-0x-contracts-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.tar.bz2
dexon-0x-contracts-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.tar.lz
dexon-0x-contracts-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.tar.xz
dexon-0x-contracts-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.tar.zst
dexon-0x-contracts-f2f9bd2e7ac1372073644a4e30a5d99e8c57fbb1.zip
Revert "Merge pull request #493 from hysz/features/deployer/multipleCodebaseSupport"
This reverts commit 70d403e6f8c56bc70e6d3471a770b9bbff5d72e7, reversing changes made to 073bf738ddb271b6b4158798baf4cac3cb0608e9.
Diffstat (limited to 'packages/deployer/test/compiler_utils_test.ts')
-rw-r--r--packages/deployer/test/compiler_utils_test.ts22
1 files changed, 8 insertions, 14 deletions
diff --git a/packages/deployer/test/compiler_utils_test.ts b/packages/deployer/test/compiler_utils_test.ts
index 5377d3308..246304858 100644
--- a/packages/deployer/test/compiler_utils_test.ts
+++ b/packages/deployer/test/compiler_utils_test.ts
@@ -47,34 +47,28 @@ describe('Compiler utils', () => {
});
describe('#parseDependencies', () => {
it('correctly parses Exchange dependencies', async () => {
- const exchangeSource = await fsWrapper.readFileAsync(`${__dirname}/fixtures/contracts/main/Exchange.sol`, {
+ const exchangeSource = await fsWrapper.readFileAsync(`${__dirname}/fixtures/contracts/Exchange.sol`, {
encoding: 'utf8',
});
- const sourceFileId = '/main/Exchange.sol';
- expect(parseDependencies(exchangeSource, sourceFileId)).to.be.deep.equal([
- '/main/TokenTransferProxy.sol',
- '/base/Token.sol',
- '/base/SafeMath.sol',
+ expect(parseDependencies(exchangeSource)).to.be.deep.equal([
+ 'TokenTransferProxy.sol',
+ 'Token.sol',
+ 'SafeMath.sol',
]);
});
it('correctly parses TokenTransferProxy dependencies', async () => {
const exchangeSource = await fsWrapper.readFileAsync(
- `${__dirname}/fixtures/contracts/main/TokenTransferProxy.sol`,
+ `${__dirname}/fixtures/contracts/TokenTransferProxy.sol`,
{
encoding: 'utf8',
},
);
- const sourceFileId = '/main/TokenTransferProxy.sol';
- expect(parseDependencies(exchangeSource, sourceFileId)).to.be.deep.equal([
- '/base/Token.sol',
- '/base/Ownable.sol',
- ]);
+ expect(parseDependencies(exchangeSource)).to.be.deep.equal(['Token.sol', 'Ownable.sol']);
});
// TODO: For now that doesn't work. This will work after we switch to a grammar-based parser
it.skip('correctly parses commented out dependencies', async () => {
const contractWithCommentedOutDependencies = `// import "./TokenTransferProxy.sol";`;
- const sourceFileId = '/main/TokenTransferProxy.sol';
- expect(parseDependencies(contractWithCommentedOutDependencies, sourceFileId)).to.be.deep.equal([]);
+ expect(parseDependencies(contractWithCommentedOutDependencies)).to.be.deep.equal([]);
});
});
});