mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-21 04:26:14 -04:00
Styles refactor
This commit is contained in:
parent
2e3ab3011f
commit
7e3750c915
9 changed files with 419 additions and 416 deletions
|
@ -1,4 +1,5 @@
|
|||
import {getMajorityValue, sample, sumOfKeys} from "./game_utils";
|
||||
import {getMajorityValue, makeEmptyPerksMap, sample, sumOfKeys} from "./game_utils";
|
||||
import {Upgrade} from "./types";
|
||||
|
||||
describe('getMajorityValue', ()=>{
|
||||
|
||||
|
@ -39,4 +40,10 @@ describe('sumOfKeys', ()=>{
|
|||
it('returns 0 for null',()=>{
|
||||
expect(sumOfKeys(null)).toEqual(0)
|
||||
})
|
||||
})
|
||||
describe('makeEmptyPerksMap', ()=>{
|
||||
it('returns an object',()=>{
|
||||
expect(makeEmptyPerksMap([{id:"ball_attract_ball"}])).toEqual({ball_attract_ball:0})
|
||||
expect(makeEmptyPerksMap([])).toEqual({})
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue