Skip to content

Commit

Permalink
Merge pull request #52 from lux-group/OPEX-391
Browse files Browse the repository at this point in the history
feat: add new LE tours vendor
  • Loading branch information
dyachoksa authored Mar 22, 2022
2 parents 5e44bf6 + fb9aba8 commit 9c15984
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion compiled/vendor/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

var LE_TOURS_VENDOR_IDS = ['00128000018BZkIAAW', '0010I00001ba7JdQAI', '0010I00001f6bHvQAI', '0010I000028DrsxQAC'];
var LE_TOURS_VENDOR_IDS = ['00128000018BZkIAAW', '0010I00001ba7JdQAI', '0010I00001f6bHvQAI', '0010I000028DrsxQAC', '0012y00000LHHZoAAP'];

function requiresTravellerDetails(vendorId) {
return LE_TOURS_VENDOR_IDS.includes(vendorId);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luxuryescapes/lib-global",
"version": "2.6.9",
"version": "2.6.10",
"description": "Lib for expanding functionality and deduplicating code between services",
"main": "compiled/index.js",
"types": "index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/vendor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const LE_TOURS_VENDOR_IDS = [
'0010I00001ba7JdQAI',
'0010I00001f6bHvQAI',
'0010I000028DrsxQAC',
'0012y00000LHHZoAAP',
]

function requiresTravellerDetails(vendorId) {
Expand Down
18 changes: 11 additions & 7 deletions test/vendor/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@ describe('Vendor', () => {
})

describe('requiresTravellerDetails', () => {
it('Must return true', async () => {
it('Must return true', async() => {
const returnData = vendor.requiresTravellerDetails('00128000018BZkIAAW')

const returnData = vendor.requiresTravellerDetails('00128000018BZkIAAW')

expect(returnData).to.eql(true)
expect(returnData).to.eql(true)
})

it('Must return false', async () => {
it('Must return true for new LE tour vendor', async() => {
const returnData = vendor.requiresTravellerDetails('0012y00000LHHZoAAP')

expect(returnData).to.eql(true)
})

const returnData = vendor.requiresTravellerDetails('192837193287')
it('Must return false', async() => {
const returnData = vendor.requiresTravellerDetails('192837193287')

expect(returnData).to.eql(false)
expect(returnData).to.eql(false)
})
})
})

0 comments on commit 9c15984

Please sign in to comment.