aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/test/compiler_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/deployer/test/compiler_test.ts')
-rw-r--r--packages/deployer/test/compiler_test.ts45
1 files changed, 0 insertions, 45 deletions
diff --git a/packages/deployer/test/compiler_test.ts b/packages/deployer/test/compiler_test.ts
deleted file mode 100644
index 4c53a871a..000000000
--- a/packages/deployer/test/compiler_test.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import { DoneCallback } from '@0xproject/types';
-import * as chai from 'chai';
-import 'mocha';
-
-import { Compiler } from '../src/compiler';
-import { fsWrapper } from '../src/utils/fs_wrapper';
-import { CompilerOptions, ContractArtifact, ContractNetworkData } from '../src/utils/types';
-
-import { exchange_binary } from './fixtures/exchange_bin';
-import { constants } from './util/constants';
-
-const expect = chai.expect;
-
-describe('#Compiler', function() {
- this.timeout(constants.timeoutMs);
- const artifactsDir = `${__dirname}/fixtures/artifacts`;
- const contractsDir = `${__dirname}/fixtures/contracts`;
- const exchangeArtifactPath = `${artifactsDir}/Exchange.json`;
- const compilerOpts: CompilerOptions = {
- artifactsDir,
- contractsDir,
- contracts: constants.contracts,
- };
- const compiler = new Compiler(compilerOpts);
- beforeEach((done: DoneCallback) => {
- (async () => {
- if (fsWrapper.doesPathExistSync(exchangeArtifactPath)) {
- await fsWrapper.removeFileAsync(exchangeArtifactPath);
- }
- await compiler.compileAsync();
- done();
- })().catch(done);
- });
- it('should create an Exchange artifact with the correct unlinked binary', async () => {
- const opts = {
- encoding: 'utf8',
- };
- const exchangeArtifactString = await fsWrapper.readFileAsync(exchangeArtifactPath, opts);
- const exchangeArtifact: ContractArtifact = JSON.parse(exchangeArtifactString);
- // The last 43 bytes of the binaries are metadata which may not be equivalent
- const unlinkedBinaryWithoutMetadata = exchangeArtifact.compilerOutput.evm.bytecode.object.slice(0, -86);
- const exchangeBinaryWithoutMetadata = exchange_binary.slice(0, -86);
- expect(unlinkedBinaryWithoutMetadata).to.equal(exchangeBinaryWithoutMetadata);
- });
-});