@vendasta/store
Version:
Components and data for Store
27 lines (26 loc) • 1 kB
JavaScript
import { VaAddonListComponent } from './addon-list.component';
import { Addon } from '@vendasta/core/marketplace-apps';
describe('component', function () {
var testListComponent;
describe('getDisplayPricing', function () {
beforeEach(function () {
testListComponent = new VaAddonListComponent();
});
it('converts number to price', function () {
var addon = Addon.fromApi({
'addonId': 'A-1441445671',
'appId': 'MP-136d75c201bb4c1c894e26c835e6a924',
'price': 500,
'title': 'undefined is also contact sales',
'description': 'Would you like?',
'tagline': 'Would you like?',
'icon': null
});
testListComponent.product = {
currency: 'USD'
};
var results = testListComponent.getDisplayPricing(addon);
expect(results.prices[0].price).toBe(500);
});
});
});