open-nomad/ui/tests/unit/utils/escape-task-name-test.js
2022-01-20 09:46:45 -05:00

12 lines
483 B
JavaScript

import escapeTaskName from 'nomad-ui/utils/escape-task-name';
import { module, test } from 'qunit';
module('Unit | Utility | escape-task-name', function () {
test('it escapes task names for the faux exec CLI', function (assert) {
assert.equal(escapeTaskName('plain'), 'plain');
assert.equal(escapeTaskName('a space'), 'a\\ space');
assert.equal(escapeTaskName('dollar $ign'), 'dollar\\ \\$ign');
assert.equal(escapeTaskName('emoji🥳'), 'emoji\\🥳');
});
});