Skip to content

Commit

Permalink
Merge pull request #263 from ScaleLeap/feature/sweden
Browse files Browse the repository at this point in the history
feat: adds Sweden marketplace
  • Loading branch information
repo-ranger[bot] authored Sep 18, 2020
2 parents e829748 + 85969e9 commit 6ad76d2
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/amazon-marketplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export enum AmazonMarketplaceCountryCode {
MX = 'MX',
NL = 'NL',
SA = 'SA',
SE = 'SE',
SG = 'SG',
TR = 'TR',
US = 'US',
Expand All @@ -41,6 +42,7 @@ export enum AmazonMarketplaceAdvertisingCurrency {
JPY = 'JPY',
MXN = 'MXN',
SAR = 'SAR',
SEK = 'SEK',
SGD = 'SGD',
TRY = 'TRY',
USD = 'USD',
Expand Down
6 changes: 6 additions & 0 deletions src/marketplaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { JP } from './jp'
import { MX } from './mx'
import { NL } from './nl'
import { SA } from './sa'
import { SE } from './se'
import { SG } from './sg'
import { TR } from './tr'
import { US } from './us'
Expand Down Expand Up @@ -99,6 +100,11 @@ export const amazonMarketplaces = {
*/
SA,

/**
* Sweden
*/
SE,

/**
* Singapore
*/
Expand Down
14 changes: 14 additions & 0 deletions src/marketplaces/se.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {
AmazonMarketplace,
AmazonMarketplaceAdvertisingCurrency,
AmazonMarketplaceCountryCode,
} from '../amazon-marketplace'

export const SE = new AmazonMarketplace({
countryCode: AmazonMarketplaceCountryCode.SE,
currency: AmazonMarketplaceAdvertisingCurrency.SEK,
id: 'A2NODRKZP88ZB9',
name: 'Sweden',
uri: 'https://www.amazon.se',
webServiceUri: 'https://mws-eu.amazonservices.com',
})
11 changes: 11 additions & 0 deletions test/__snapshots__/marketplaces.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,17 @@ AmazonMarketplace {
}
`;

exports[`marketplace SE should match snapshot 1`] = `
AmazonMarketplace {
"countryCode": "SE",
"currency": "SEK",
"id": "A2NODRKZP88ZB9",
"name": "Sweden",
"uri": "https://www.amazon.se",
"webServiceUri": "https://mws-eu.amazonservices.com",
}
`;

exports[`marketplace SG should match snapshot 1`] = `
AmazonMarketplace {
"countryCode": "SG",
Expand Down
2 changes: 1 addition & 1 deletion test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ describe('index', () => {
expect.assertions(2)

expect(Array.isArray(amazonMarketplacesList)).toBeDefined()
expect(amazonMarketplacesList).toHaveLength(19)
expect(amazonMarketplacesList).toHaveLength(20)
})
})
2 changes: 1 addition & 1 deletion test/marketplaces.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('marketplace', () => {
it('has a known number of marketplaces', () => {
expect.assertions(1)

expect(countryCodes).toHaveLength(19)
expect(countryCodes).toHaveLength(20)
})

describe.each(countryCodes)('%s', (countryCode) => {
Expand Down

0 comments on commit 6ad76d2

Please sign in to comment.