-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated
README
and last minor changes
- Loading branch information
1 parent
f6564cb
commit e1d155f
Showing
9 changed files
with
477 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { EnvOptions, VocdoniCensus3Client } from '../../../src'; | ||
|
||
describe('Census3 censuses integration tests', () => { | ||
it('should return the supported censuses information', async () => { | ||
const client = new VocdoniCensus3Client({ env: EnvOptions.DEV }); | ||
const strategies = await client.getStrategies(); | ||
if (strategies.length > 0) { | ||
const censuses = await client.getCensuses(strategies[0].ID); | ||
censuses.forEach((census) => { | ||
expect(census).toMatchObject({ | ||
ID: expect.any(Number), | ||
strategyID: expect.any(Number), | ||
merkleRoot: expect.any(String), | ||
uri: expect.any(String), | ||
size: expect.any(Number), | ||
weight: expect.any(String), | ||
anonymous: expect.any(Boolean), | ||
}); | ||
}); | ||
} | ||
}, 15000); | ||
it('should return the census information', async () => { | ||
const client = new VocdoniCensus3Client({ env: EnvOptions.DEV }); | ||
const strategies = await client.getStrategies(); | ||
if (strategies.length > 0) { | ||
const censuses = await client.getCensuses(strategies[0].ID); | ||
if (censuses.length > 0) { | ||
const census = await client.getCensus(censuses[0].ID); | ||
expect(census).toMatchObject({ | ||
ID: expect.any(Number), | ||
strategyID: expect.any(Number), | ||
merkleRoot: expect.any(String), | ||
uri: expect.any(String), | ||
size: expect.any(Number), | ||
weight: expect.any(String), | ||
anonymous: expect.any(Boolean), | ||
}); | ||
} | ||
} | ||
}, 15000); | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters