Combines the following repositories into one: https://github.com/mattermost/mattermost-server https://github.com/mattermost/mattermost-webapp https://github.com/mattermost/focalboard https://github.com/mattermost/mattermost-plugin-playbooks
19 строки
652 B
TypeScript
19 строки
652 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {buildQueryString} from './helpers';
|
|
|
|
describe('Helpers', () => {
|
|
test.each([
|
|
[{}, ''],
|
|
[{a: 1}, '?a=1'],
|
|
[{a: 1, b: 'str'}, '?a=1&b=str'],
|
|
[{a: 1, b: 'str', c: undefined}, '?a=1&b=str'],
|
|
[{a: 1, b: 'str', c: 0}, '?a=1&b=str&c=0'],
|
|
[{a: 1, b: 'str', c: ''}, '?a=1&b=str&c='],
|
|
[{a: 1, b: undefined, c: 'str'}, '?a=1&c=str'],
|
|
])('buildQueryString with %o should return %s', (params, expected) => {
|
|
expect(buildQueryString(params)).toEqual(expected);
|
|
});
|
|
});
|