2018-04-18 20:32:51 +00:00
|
|
|
/*globals describe, it*/
|
|
|
|
const File = require('../lib/core/file');
|
|
|
|
const fs = require('fs-extra');
|
|
|
|
|
|
|
|
describe('embark.File', function () {
|
|
|
|
describe('parseFileForImport', () => {
|
2018-04-19 17:29:25 +00:00
|
|
|
it('should find all the imports', function (done) {
|
2018-04-18 20:32:51 +00:00
|
|
|
const contract = fs.readFileSync('./test/contracts/simple_storage.sol').toString();
|
2018-04-19 17:29:25 +00:00
|
|
|
const file = new File({filename: '.embark/contracts/embark-framework/embark/master/test_app/app/contracts/simple_storage.sol',
|
2018-04-19 14:05:11 +00:00
|
|
|
path: 'https://raw.githubusercontent.com/embark-framework/embark/develop/test_apps/test_app/app/contracts/simple_storage.sol'});
|
2018-04-19 17:29:25 +00:00
|
|
|
file.parseFileForImport(contract, () => {
|
|
|
|
done();
|
|
|
|
});
|
2018-04-18 20:32:51 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|