Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Commit

Permalink
fix tests and update readme (#8)
Browse files Browse the repository at this point in the history
* update readme

* Fix swapTestCases
  • Loading branch information
roman-monk authored Sep 27, 2020
1 parent 7f82d77 commit 3b21430
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
# Pancake Factory

[![Actions Status](https://github.com/pancakeswap/pancake-swap-core/workflows/CI/badge.svg)](https://github.com/pancakeswap/pancake-swap-core/actions)

In-depth documentation on PancakeSwap is available at [docs.pancakeswap.finance](https://docs.pancakeswap.finance/).

# Local Development

The following assumes the use of `node@>=10`.

## Install Dependencies

`yarn`

## Compile Contracts

`yarn compile`

## Run Tests

`yarn test`
14 changes: 7 additions & 7 deletions test/PancakePair.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ describe('PancakePair', () => {
await pair.mint(wallet.address, overrides)
}
const swapTestCases: BigNumber[][] = [
[1, 5, 10, '1662497915624478906'],
[1, 10, 5, '453305446940074565'],
[1, 5, 10, '1663887962654218072'],
[1, 10, 5, '453718857974177123'],

[2, 5, 10, '2851015155847869602'],
[2, 10, 5, '831248957812239453'],
[2, 5, 10, '2853058890794739851'],
[2, 10, 5, '831943981327109036'],

[1, 10, 10, '906610893880149131'],
[1, 100, 100, '987158034397061298'],
[1, 1000, 1000, '996006981039903216']
[1, 10, 10, '907437715948354246'],
[1, 100, 100, '988138378977801540'],
[1, 1000, 1000, '997004989020957084']
].map(a => a.map(n => (typeof n === 'string' ? bigNumberify(n) : expandTo18Decimals(n))))
swapTestCases.forEach((swapTestCase, i) => {
it(`getInputPrice:${i}`, async () => {
Expand Down

0 comments on commit 3b21430

Please sign in to comment.