diff --git a/tests/uri.test.js b/tests/uri.test.js index 10b2047..055fe6f 100644 --- a/tests/uri.test.js +++ b/tests/uri.test.js @@ -1,22 +1,16 @@ import util from '../web/utils/uri' test('base URI', () => { - const category = 'dev' - const lang = 'ko' - const uri = util.getUri(category, lang) + const uri = util.getUri('dev', 'ko') expect(uri).toBe('/') }) test('category URI', () => { - const category = 'food' - const lang = 'ko' - const uri = util.getUri(category, lang) + const uri = util.getUri('food', 'ko') expect(uri).toBe('/food/') }) test('lang URI', () => { - const category = 'dev' - const lang = 'en' - const uri = util.getUri(category, lang) + const uri = util.getUri('dev', 'en') expect(uri).toBe('/en') }) diff --git a/web/utils/uri.js b/web/utils/uri.js index fbf2354..96fe5c4 100644 --- a/web/utils/uri.js +++ b/web/utils/uri.js @@ -1,4 +1,4 @@ -function getUri(category = 'dev', lang) { +function getUri(category = 'dev', lang = '') { if (category === 'dev') { category = '' }