hooks.afterEach(() => {
   ReactDOM.unmountComponentAtNode($domNode)
   $domNode = null
   subject = null
   fixtures.innerHTML = ''
   moxios.uninstall()
 })
 afterEach(() => {
   moxios.uninstall();
 });
}

let plannerStub

QUnit.module('Dashboard Header', {
  setup () {
    window.ENV = {
      PREFERENCES: {},
      STUDENT_PLANNER_COURSES: [],
    }
    moxios.install()
    plannerStub = sinon.stub(DashboardHeader.prototype, 'loadPlannerComponent')
  },

  teardown () {
    moxios.uninstall()
    plannerStub.restore()
    ReactDOM.unmountComponentAtNode(container)
  }
})

test('it renders', () => {
  const dashboardHeader = shallow(
    <DashboardHeader planner_enabled planner_selected />
  )
  ok(dashboardHeader)
})

test('it waits for the erb html to be injected before rendering the ToDoSidebar', assert => {
  const done = assert.async()
  ENV.DASHBOARD_SIDEBAR_URL = 'fake-dashboard-sidebar-url'
Example #4
0
 afterEach(() => {
   moxios.uninstall();
   sandbox.restore();
 });
 afterEach(() => {
   moxios.uninstall(axiosInstance);
 });
Example #6
0
 teardown: () => {
   sandbox.restore()
   sandbox = null
   moxios.uninstall()
 }
afterEach(() => {
  moxios.uninstall();
  MockDate.reset();
  Actions.sidebarLoadNextItems.reset();
  Actions.maybeUpdateTodoSidebar.reset();
});
Example #8
0
 after(() => moxios.uninstall());
Example #9
0
 afterEach(() => {
     Moxios.uninstall()
 })
 afterEach(() => {
   moxios.uninstall();
   SidebarActions.maybeUpdateTodoSidebar.reset();
 });
Example #11
0
 afterEach(() => {
   sandbox.restore();
   nock.enableNetConnect();
   moxios.uninstall();
 });