@0x/contract-artifacts
: Fix contract-artifacts
tests
This commit is contained in:
parent
72fc0c845a
commit
5df74d35d0
@ -1,14 +1,17 @@
|
||||
import * as chai from 'chai';
|
||||
import { get } from 'lodash';
|
||||
import {get} from 'lodash';
|
||||
import 'mocha';
|
||||
|
||||
import * as artifacts from '../src/index';
|
||||
|
||||
import { ObjectMap } from '../../types/lib';
|
||||
import { FORBIDDEN_PROPERTIES, REQUIRED_PROPERTIES } from '../src/transform';
|
||||
import {FORBIDDEN_PROPERTIES, REQUIRED_PROPERTIES} from '../src/transform';
|
||||
|
||||
const expect = chai.expect;
|
||||
|
||||
interface ObjectMap<T> {
|
||||
[name: string]: T;
|
||||
}
|
||||
|
||||
// For pure functions, we use local EVM execution in `@0x/base-contract` instead
|
||||
// of making an eth_call. This requires the `deployedBytecode` from compiler output.
|
||||
const CONTRACTS_WITH_PURE_FNS = [
|
||||
@ -24,7 +27,7 @@ const CONTRACTS_WITH_PURE_FNS = [
|
||||
|
||||
describe('Contract Artifacts', () => {
|
||||
it('should not include forbidden attributes', () => {
|
||||
const forbiddenPropertiesByArtifact: { [name: string]: string[] } = {};
|
||||
const forbiddenPropertiesByArtifact: {[name: string]: string[]} = {};
|
||||
for (const [artifactName, artifact] of Object.entries(artifacts)) {
|
||||
for (const forbiddenProperty of FORBIDDEN_PROPERTIES) {
|
||||
const rejectedValue = get(artifact, forbiddenProperty);
|
||||
|
Loading…
x
Reference in New Issue
Block a user