datahub/datahub-web/@datahub/utils/tests/unit/array/serialize-string-test.ts
2019-08-31 20:51:14 -07:00

12 lines
508 B
TypeScript

import { module, test } from 'qunit';
import { serializeStringArray } from '@datahub/utils/array/serialize-string';
module('Unit | Utility | array/serialize-string', function() {
test('it serializes the values in an array to a sorted string', function(assert) {
const arrayOfStrings = ['charmander', 'squirtle', 'bulbasaur'];
const expectedResult = 'bulbasaur,charmander,squirtle';
assert.equal(serializeStringArray(arrayOfStrings), expectedResult, 'Achieves the expected result');
});
});