diff options
author | Fabio Berger <me@fabioberger.com> | 2018-09-29 21:22:49 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-09-29 21:22:49 +0800 |
commit | b9eb2b3918b4b1a891c07a4ccb5eb40847ae90fc (patch) | |
tree | 425b769a18e56a495c27e6da36da176449affa1c /packages/sol-doc/test | |
parent | 2b6a9911f5f821114a65474e75f5ed52e8bad980 (diff) | |
download | dexon-sol-tools-b9eb2b3918b4b1a891c07a4ccb5eb40847ae90fc.tar dexon-sol-tools-b9eb2b3918b4b1a891c07a4ccb5eb40847ae90fc.tar.gz dexon-sol-tools-b9eb2b3918b4b1a891c07a4ccb5eb40847ae90fc.tar.bz2 dexon-sol-tools-b9eb2b3918b4b1a891c07a4ccb5eb40847ae90fc.tar.lz dexon-sol-tools-b9eb2b3918b4b1a891c07a4ccb5eb40847ae90fc.tar.xz dexon-sol-tools-b9eb2b3918b4b1a891c07a4ccb5eb40847ae90fc.tar.zst dexon-sol-tools-b9eb2b3918b4b1a891c07a4ccb5eb40847ae90fc.zip |
Add test that structs are documented in separate section
Diffstat (limited to 'packages/sol-doc/test')
-rw-r--r-- | packages/sol-doc/test/solidity_doc_generator_test.ts | 7 |
1 files changed, 7 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 081fd4188..f166fb143 100644 --- a/packages/sol-doc/test/solidity_doc_generator_test.ts +++ b/packages/sol-doc/test/solidity_doc_generator_test.ts @@ -207,6 +207,13 @@ describe('#SolidityDocGenerator', () => { expect(methodWithStructParamAndReturn.returnComment).to.be.equal('RETURN_COMMENT'); expect(methodWithStructParamAndReturn.parameters[0].comment).to.be.equal('STUFF_COMMENT'); }); + it('should document the structs included in a contract', async () => { + const doc = await solDoc.generateSolDocAsync(`${__dirname}/../../test/fixtures/contracts`, [ + 'StructParamAndReturn', + ]); + expect(doc.structs).to.not.be.undefined(); + expect(doc.structs.types.length).to.be.equal(1); + }); }); function verifyTokenTransferProxyABIIsDocumented(doc: DocAgnosticFormat, contractName: string): void { |