You've already forked tf2wikipricing
refactor: priceUsingPricesTF now expects an SKU string
This commit is contained in:
@@ -62,7 +62,7 @@ describe('Price Service', () => {
|
||||
|
||||
const result = await fetchPrice(mockToken, mockDefIndex, mockQuality)
|
||||
|
||||
expect(priceUsingPricesTF).toHaveBeenCalledWith(mockToken, mockDefIndex, mockQuality)
|
||||
expect(priceUsingPricesTF).toHaveBeenCalledWith(mockToken, `${mockDefIndex};${mockQuality}`)
|
||||
expect(setStorageValue).toHaveBeenCalled()
|
||||
expect(result.metal).not.toBe(mockCachedData.metal)
|
||||
expect(result.metal).toBe(mockPriceResponse.metal)
|
||||
@@ -86,7 +86,7 @@ describe('Price Service', () => {
|
||||
|
||||
const result = await fetchKeyPrice(mockToken)
|
||||
|
||||
expect(priceUsingPricesTF).toHaveBeenCalledWith(mockToken, defindex_key, 6)
|
||||
expect(priceUsingPricesTF).toHaveBeenCalledWith(mockToken, `${defindex_key};6`)
|
||||
expect(result.keys).toBe(0) // A key cannot cost a key :P
|
||||
expect(result.metal).toBe(mockKeyPriceResponse.metal)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user