2020-03-24 23:22:16 +00:00
|
|
|
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');
|
2021-02-09 15:33:48 +00:00
|
|
|
assert.equal(escapeTaskName('emoji🥳'), 'emoji\\🥳');
|
2020-03-24 23:22:16 +00:00
|
|
|
});
|
|
|
|
});
|