{"size": 668, "ext": "js", "max_stars_repo_path": "test/action.test.js", "max_stars_repo_name": "XtractSolutions/modal-framework", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "test/action.test.js", "max_issues_repo_name": "XtractSolutions/modal-framework", "max_issues_repo_issues_event_min_datetime": "2020-08-25T18:20:08.000Z", "max_issues_repo_issues_event_max_datetime": "2021-02-09T17:18:18.000Z", "max_forks_repo_path": "test/action.test.js", "max_forks_repo_name": "XtractSolutions/modal-framework", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 23.8571428571, "max_line_length": 55, "alphanum_fraction": 0.6062874251}
import { expect } from 'chai'
import {
  openModal,
  closeModal,
  closeAllModals
} from '../src/actions/modalActions'

describe('modal framework actions', function() {
  it('Should create an open_modal action', () => {
    expect(openModal('abc123', {})).to.deep.equal({
      type: 'open_modal',
      address: 'abc123',
      modalConfig: {}
    })
  })
  it('Should create a close_modal action', () => {
    expect(closeModal('abc123')).to.deep.equal({
      type: 'close_modal',
      address: 'abc123'
    })
  })
  it('Should create a close_all_modals action', () => {
    expect(closeAllModals()).to.deep.equal({
      type: 'close_all_modals'
    })
  })
})
