rsnext/test/unit/router-add-base-path.test.js
Fonger 5248e182fe
fix(export): fallback to empty string for basePath (#11880)
* fix(next-server): fallback to empty string for basePath

* Revert extra change and add unit test

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-04-14 19:12:02 -04:00

9 lines
278 B
JavaScript

/* eslint-env jest */
import { addBasePath } from 'next/dist/next-server/lib/router/router'
describe('router addBasePath', () => {
it('should add basePath correctly when no basePath', () => {
const result = addBasePath('/hello')
expect(result).toBe('/hello')
})
})