Repository URL to install this package:
|
Version:
7.1.2 ▾
|
import { OneRequest } from '../src/TwoRequest'
import '../src/deps/polyfill'
describe('deps', () => {
it('path value should update properly', () => {
// todo
const basePath = 'https://euat.skavaone.com/ecomm/storefront/customers'
const newRequest = new OneRequest().basePath(basePath).delete()
expect(newRequest._get('basePath')).toEqual(basePath)
newRequest.path('123')
const basePathWithPath = basePath + '/123'
expect(newRequest._get('url')).toEqual(basePathWithPath)
newRequest.path('124')
const basePathWithNewPath = basePath + '/124'
expect(newRequest._get('url')).toEqual(basePathWithNewPath)
})
})