Skip to content

Commit

Permalink
test(editor): always provide default modules when not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Kiefer committed Jul 26, 2022
1 parent 38ca4aa commit 8215ae3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions packages/form-js-editor/test/helper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,15 @@ export function bootstrapFormEditor(schema, options, locals) {
}
}, OPTIONS, _options);

if (_locals) {
const mockModule = {};

const mockModule = {};

forEach(_locals, function(value, key) {
mockModule[ key ] = [ 'value', value ];
});
forEach(_locals, function(value, key) {
mockModule[ key ] = [ 'value', value ];
});

_options.modules = [].concat(_options.modules || [], [ mockModule ]);
_options.modules = [].concat(_options.modules || [], [ mockModule ]);
}

// remove previous instance
cleanup();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ insertStyles();
describe('features/modeling', function() {

beforeEach(bootstrapFormEditor(schema, {
additionalModules: [
modules: [
modelingModule
]
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import schema from '../../../form.json';
describe('features/modeling - IdBehavior', function() {

beforeEach(bootstrapFormEditor(schema, {
additionalModules: [
modules: [
modelingModule
]
}));
Expand Down

0 comments on commit 8215ae3

Please sign in to comment.