You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui-v2/tests/unit/utils/templatize-test.js

21 lines
750 B

import templatize from 'consul-ui/utils/templatize';
import { module, test } from 'qunit';
module('Unit | Utility | templatize', function() {
test('it prefixes the word template to every string in the array', function(assert) {
const expected = ['template-one', 'template-two'];
const actual = templatize(['one', 'two']);
assert.deepEqual(actual, expected);
});
test('it returns an empty array when passed an empty array', function(assert) {
const expected = [];
const actual = templatize([]);
assert.deepEqual(actual, expected);
});
test('it returns an empty array when passed nothing', function(assert) {
const expected = [];
const actual = templatize();
assert.deepEqual(actual, expected);
});
});