Skip to content

Commit

Permalink
add testcase for #20
Browse files Browse the repository at this point in the history
  • Loading branch information
smhg committed Jan 31, 2020
1 parent d4c5c3e commit 793f994
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,16 @@ describe('with Express', () => {
}, done);
});

it('should ignore values not whitelisted', done => {
request(createServer({
priority: ['query', 'map'],
allowed: ['en-CA', 'fr-CA'],
map: { en: 'en-CA', fr: 'fr-CA' }
}))
.get('/?locale=fr')
.expect('', done);
});

it('should skip mapping if the same language returns in the next locale', done => {
request(createServer({
map: { de: 'de-DE' }
Expand Down

0 comments on commit 793f994

Please sign in to comment.