open-nomad/ui/tests/unit/utils/escape-task-name-test.js
Buck Doyle 674da96a59
UI: add exec terminal (#6697)
This connects Xterm.js to a Nomad exec websocket so people
can interact on clients via live sessions. There are buttons on
job, allocation, task group, and task detail pages that open a
popup that lets them edit their shell command and start a
session.

More is to come, as recorded in issues.
2020-03-24 18:22:16 -05:00

11 lines
419 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');
});
});