aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-doc/test
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-09-01 03:34:13 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-09-01 04:18:17 +0800
commit800dd5fb4f0ab21388440a46aef21cd0cf0801c3 (patch)
tree62f1c706aa3a35ab28d60c157630997ae624d152 /packages/sol-doc/test
parent3dc4eb4421d4f0b1294fcaaa4602245005f36e82 (diff)
downloaddexon-sol-tools-800dd5fb4f0ab21388440a46aef21cd0cf0801c3.tar
dexon-sol-tools-800dd5fb4f0ab21388440a46aef21cd0cf0801c3.tar.gz
dexon-sol-tools-800dd5fb4f0ab21388440a46aef21cd0cf0801c3.tar.bz2
dexon-sol-tools-800dd5fb4f0ab21388440a46aef21cd0cf0801c3.tar.lz
dexon-sol-tools-800dd5fb4f0ab21388440a46aef21cd0cf0801c3.tar.xz
dexon-sol-tools-800dd5fb4f0ab21388440a46aef21cd0cf0801c3.tar.zst
dexon-sol-tools-800dd5fb4f0ab21388440a46aef21cd0cf0801c3.zip
ammend generated docs with solc's devdoc output
Diffstat (limited to 'packages/sol-doc/test')
-rw-r--r--packages/sol-doc/test/solidity_doc_generator_test.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/sol-doc/test/solidity_doc_generator_test.ts b/packages/sol-doc/test/solidity_doc_generator_test.ts
index 989f29320..7f11fcdfd 100644
--- a/packages/sol-doc/test/solidity_doc_generator_test.ts
+++ b/packages/sol-doc/test/solidity_doc_generator_test.ts
@@ -3,6 +3,8 @@ import * as _ from 'lodash';
import * as chai from 'chai';
import 'mocha';
+import { SolidityMethod } from '@0xproject/types';
+
import { generateSolDocAsync } from '../src/solidity_doc_generator';
import { chaiSetup } from './util/chai_setup';
@@ -55,5 +57,20 @@ describe('#SolidityDocGenerator', () => {
throw new Error('events should never be undefined');
}
expect(doc.ERC20Basic.events.length).to.equal(erc20BasicEventCount);
+
+ let addAuthorizedAddressMethod: SolidityMethod | undefined;
+ for (const method of doc.TokenTransferProxy.methods) {
+ if (method.name === 'addAuthorizedAddress') {
+ addAuthorizedAddressMethod = method;
+ }
+ }
+ expect(
+ addAuthorizedAddressMethod,
+ `method addAuthorizedAddress not found in ${JSON.stringify(doc.TokenTransferProxy.methods)}`,
+ ).to.not.be.undefined();
+ const tokenTransferProxyAddAuthorizedAddressComment = 'Authorizes an address.';
+ expect((addAuthorizedAddressMethod as SolidityMethod).comment).to.equal(
+ tokenTransferProxyAddAuthorizedAddressComment,
+ );
});
});