Skip to content

Commit

Permalink
Merge pull request #1462 from lucasnetau/test-fix
Browse files Browse the repository at this point in the history
Fix failing test post XHR PR
  • Loading branch information
lucasnetau authored Oct 20, 2023
2 parents c7e1ac6 + af1e6be commit cacf5a8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/form-builder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,11 @@ describe('async loading tests', () => {
const infoLogSpy = jest.spyOn(console, 'info').mockImplementation(() => {})
const fbWrap = $('<div>')
const fb = $(fbWrap).formBuilder()
fb.actions.getData()
expect(fb.actions.getData()).toBeUndefined()
expect(errorLogSpy).toHaveBeenCalledWith('formBuilder is still initialising')

await fb.promise
fb.actions.getData()
expect(errorLogSpy).toHaveBeenCalledTimes(1)
expect(fb.actions.getData()).toStrictEqual([])
})

test('Can load multiple formBuilders concurrently via promise interface without interference', async () => {
Expand Down

0 comments on commit cacf5a8

Please sign in to comment.