Skip to content

Commit

Permalink
chore: small test description improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
CatchABus committed Jul 24, 2021
1 parent 16fe9f8 commit 0775e9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/util.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {dequal as isEqual} from 'dequal/lite';

function subscribeOnce(observable) {
return new Promise(resolve => {
return new Promise((resolve) => {
observable.subscribe(resolve)(); // immediately invoke to unsubscribe
});
}

function update(object, path, value) {
object.update(o => {
object.update((o) => {
set(o, path, value);
return o;
});
Expand Down Expand Up @@ -54,7 +54,7 @@ function getErrorsFromSchema(initialValues, schema, errors = {}) {
case schema[key].type === 'array': {
const values =
initialValues && initialValues[key] ? initialValues[key] : [];
errors[key] = values.map(value =>
errors[key] = values.map((value) =>
getErrorsFromSchema(
value,
schema[key].innerType.fields,
Expand All @@ -77,7 +77,7 @@ const deepEqual = isEqual;

function assignDeep(object, value) {
if (Array.isArray(object)) {
return object.map(o => assignDeep(o, value));
return object.map((o) => assignDeep(o, value));
}
const copy = {};
for (const key in object) {
Expand Down
2 changes: 1 addition & 1 deletion test/specs/library.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ describe('createForm', () => {
});
});

it('validateFn handles nested values', done => {
it('validateFn handles nested values on submit', done => {
const errorMessage = 'this field is invalid';
const instance = createForm({
initialValues: {
Expand Down

0 comments on commit 0775e9d

Please sign in to comment.