-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✅ Moving tests from Mocha to Jest (#2257)
* ✅ Moving tests from Mocha to Jest * Getting coverage (disable cache in pipeline) * update README.md
- Loading branch information
1 parent
7d0cfd9
commit e19e6bc
Showing
63 changed files
with
1,584 additions
and
2,882 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# ENV For tests |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,21 +1,20 @@ | ||
import { getCollaterals, getCollateralTokens } from 'blockchain/addresses/addressesUtils' | ||
import mainnet from 'blockchain/addresses/mainnet.json' | ||
import { supportedIlks } from 'blockchain/tokens/mainnet' | ||
import { expect } from 'chai' | ||
|
||
describe('adressesUtils', () => { | ||
it('should filter collaterals correctly', async function () { | ||
it('should filter collaterals correctly', async () => { | ||
const actual = getCollaterals({ PIP_ETH: '', PIP_XYZ: '', XYZ_WBTC: '' }, supportedIlks) | ||
expect(actual).to.be.not.undefined | ||
expect(actual.length).to.be.equal(1) | ||
expect(actual[0]).to.be.equal('ETH') | ||
expect(actual).toBeDefined() | ||
expect(actual.length).toBe(1) | ||
expect(actual[0]).toBe('ETH') | ||
}) | ||
it('should filter collateral tokens correctly', async function () { | ||
it('should filter collateral tokens correctly', async () => { | ||
const collaterals = getCollaterals(mainnet, supportedIlks) | ||
const tokens = getCollateralTokens(mainnet, supportedIlks) | ||
expect(Object.keys(tokens).length).to.be.equal(collaterals.length) | ||
expect(Object.keys(tokens).length).toBe(collaterals.length) | ||
Object.keys(tokens).forEach((element, idx) => { | ||
expect(element).to.be.equal(collaterals[idx]) | ||
expect(element).toBe(collaterals[idx]) | ||
}) | ||
}) | ||
}) |
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
Oops, something went wrong.