Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

add jest-circus #91

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"html-webpack-plugin": "^2.30.1",
"husky": "^3.0.8",
"jest": "^24.5.0",
"jest-circus": "^24.6.0",
"lint-staged": "^7.1.0",
"minimist": "^1.2.0",
"prettier": "^1.12.1",
Expand Down
1 change: 1 addition & 0 deletions packages/dai/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ module.exports = {
"test"
],
"setupFilesAfterEnv": ["<rootDir>/test/setup-test.js"],
"testRunner": "jest-circus/runner",
"testPathIgnorePatterns": ["<rootDir>/node_modules/", "<rootDir>/test/build.spec.js", "<rootDir>/test/integration/"]
}
8 changes: 3 additions & 5 deletions packages/dai/test/eth/EthereumCdpService.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,19 @@ describe('find cdp', () => {
test('can calculate system collateralization', async () => {
const cdp = await cdpService.openCdp();
let lock = cdp.lockEth(0.1);
mineBlocks(cdpService);
await lock;
await Promise.all([lock, mineBlocks(cdpService)]);
await cdp.drawDai(1);
const scA = await cdpService.getSystemCollateralization();

lock = cdp.lockEth(0.1);
mineBlocks(cdpService);
await lock;
await Promise.all([lock, mineBlocks(cdpService)]);
const scB = await cdpService.getSystemCollateralization();
expect(scB).toBeGreaterThan(scA);

await cdp.drawDai(1);
const scC = await cdpService.getSystemCollateralization();
expect(scC).toBeLessThan(scB);
});
}, 10000);

test('openCdp returns the transaction object', async () => {
const txo = cdpService.openCdp();
Expand Down
2 changes: 1 addition & 1 deletion packages/dai/test/eth/Web3Service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ test('be authenticated and know default address when private key passed in', don
});

test('determine correct connection status', async done => {
const service = buildTestService();
const service = buildTestService(null, 200);

expect(await service._isStillConnected()).toBe(false);
await service.manager().connect();
Expand Down
Loading