mirror of
https://github.com/status-im/consul.git
synced 2025-03-04 07:10:49 +00:00
* Upgrade to 3.25 via ember-cli-update * v3.25.3...v3.26.1 * v3.26.1...v3.27.0 Co-authored-by: Michael Klein <michael@firstiwaslike.com>
35 lines
711 B
JavaScript
35 lines
711 B
JavaScript
import { module, test } from 'qunit';
|
|
import isFolder from 'consul-ui/utils/isFolder';
|
|
|
|
module('Unit | Utils | isFolder', function () {
|
|
test('it detects if a string ends in a slash', function (assert) {
|
|
assert.expect(5);
|
|
|
|
[
|
|
{
|
|
test: 'hello/world',
|
|
expected: false,
|
|
},
|
|
{
|
|
test: 'hello/world/',
|
|
expected: true,
|
|
},
|
|
{
|
|
test: '/hello/world',
|
|
expected: false,
|
|
},
|
|
{
|
|
test: '//',
|
|
expected: true,
|
|
},
|
|
{
|
|
test: undefined,
|
|
expected: false,
|
|
},
|
|
].forEach(function (item) {
|
|
const actual = isFolder(item.test);
|
|
assert.equal(actual, item.expected);
|
|
});
|
|
});
|
|
});
|