couponable
Advanced tools
Comparing version 5.0.0 to 6.0.0
{ | ||
"name": "couponable", | ||
"version": "5.0.0", | ||
"version": "6.0.0", | ||
"description": "Helper functions for dealing with coupons.", | ||
@@ -5,0 +5,0 @@ "main": [ "index.js" ], |
@@ -97,3 +97,3 @@ // if the comma or decimal portions of the price need internationalization | ||
} else { | ||
return orderItem.priceInCents; | ||
return orderItem.priceInCents * (orderItem.quantity || 1); | ||
} | ||
@@ -100,0 +100,0 @@ } else { |
{ | ||
"name": "couponable", | ||
"description": "Helper functions for dealing with coupons.", | ||
"version": "5.0.0", | ||
"version": "6.0.0", | ||
"author": "Chris McC", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
10
test.js
@@ -166,2 +166,12 @@ var couponable = require('.'); | ||
it('returns the total recurring while taking quantity into account', function() { | ||
assert.equal(totalLineTwo({ | ||
quantity: 10, | ||
purchasableType: 'bundle', | ||
interval: 'month', | ||
coupon: {amountOffInCents: 4, duration: 'once'}, | ||
priceInCents: 6 | ||
}), '$0.60 / month'); | ||
}); | ||
it('returns an alternate currency symbol', function() { | ||
@@ -168,0 +178,0 @@ assert.equal(totalLineTwo({ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12866
375
6