MCPcopy Index your code
hub / github.com/bugy/script-server / assertLastError

Function assertLastError

web-src/tests/unit/admin/ParameterConfigForm_test.js:177–188  ·  view source on GitHub ↗
(fieldName, expectedError)

Source from the content-addressed store, hash-verified

175 };
176
177 const assertLastError = (fieldName, expectedError) => {
178 const foundError = errors.slice().reverse().find(error => error.fieldName === fieldName);
179
180 if (isBlankString(expectedError)) {
181 expect(foundError?.message).toBeEmpty()
182 return;
183 }
184
185 expect(foundError).not.toBeNil()
186
187 expect(foundError.message).toBe(expectedError)
188 };
189
190 describe('Test initial values', function () {
191

Callers 1

Calls 1

isBlankStringFunction · 0.90

Tested by

no test coverage detected