Commit 99ccea68 authored by Josh Pollock's avatar Josh Pollock

#5 test to disprove issue

parent 751ab446
Pipeline #3773 passed with stages
in 1 minute and 57 seconds
......@@ -225,4 +225,29 @@ describe('cfEditorState', () => {
expect(state.getMagicTagsByType('email').length).toBe(2);
expect(state.getMagicTagsByType('text').length).toBe(1);
});
it('Returns a different object from getAllMagicTags after updating', () => {
const state = cfEditorState({
initialSystemValues: [
{ tag: 'user:first_name', type: 'text' },
{ tag: 'user:user_email', type: 'email' },
],
initialFields: [
{
ID: 'fld1',
tag: 'one',
slug: 'one',
label: 'One',
type: 'email',
},
],
});
state.addMagicType('mailchimp', true, [
{ tag: 'first_name', type: 'text' },
{ tag: 'email', type: 'email' },
]);
const tags = state.getAllMagicTags();
state.removeMagicType('mailchimp');
expect(tags === state.getAllMagicTags()).toEqual(false);
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment