Skip to content

Commit

Permalink
refactor: remove bignumber.js dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Cafe137 committed Jun 26, 2024
1 parent 6de29f9 commit 82f2198
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
14 changes: 0 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"dependencies": {
"@ethersphere/bee-js": "^7.0.3",
"@fairdatasociety/bmt-js": "^2.1.0",
"bignumber.js": "^9.1.0",
"cafe-utility": "^22.0.0",
"chalk": "^2.4.2",
"cli-progress": "^3.11.2",
Expand Down
7 changes: 3 additions & 4 deletions test/command/stake.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import BigNumber from 'bignumber.js'
import { describeCommand, invokeTestCli } from '../utility'

describeCommand('Test Stake command', ({ consoleMessages }) => {
Expand All @@ -10,9 +9,9 @@ describeCommand('Test Stake command', ({ consoleMessages }) => {
it('should print balance in quiet mode', async () => {
await invokeTestCli(['stake', '--quiet'])

const initialStake = BigNumber(consoleMessages[0])
const initialStake = parseFloat(consoleMessages[0])
await invokeTestCli(['stake', '--quiet', '--deposit', '100_000T'])
const afterDepositStake = BigNumber(consoleMessages[1])
expect(afterDepositStake.minus(initialStake).isEqualTo(10)).toEqual(true)
const afterDepositStake = parseFloat(consoleMessages[1])
expect(afterDepositStake).toBeGreaterThan(initialStake)
})
})

0 comments on commit 82f2198

Please sign in to comment.