mirror of https://github.com/hashicorp/consul
12 lines
465 B
JavaScript
12 lines
465 B
JavaScript
import getFormNameProperty from 'consul-ui/utils/get-form-name-property';
|
|
import { module, test } from 'qunit';
|
|
|
|
module('Unit | Utility | get form name property', function() {
|
|
// Replace this with your real tests.
|
|
test("it parses 'item[property]' to `['item',' property']`", function(assert) {
|
|
const expected = ['item', 'property'];
|
|
const actual = getFormNameProperty(`${expected[0]}[${expected[1]}]`);
|
|
assert.deepEqual(actual, expected);
|
|
});
|
|
});
|