<commit_before>// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import DukeconKeycloak from './DukeconKeycloak'
import Router from 'vue-router'
import Schedule from '@/components/Schedule'
import ScheduledEvent from '@/components/ScheduledEvent'
import $ from 'jquery'

Vue.config.productionTip = false

function initVue () {
  Vue.use(Router)
  var router = new Router({
    routes: [
      {
        path: '/',
        name: 'schedule',
        component: Schedule
      },
      {
        path: '/scheduledEvent/:eventId',
        name: 'scheduledEvent',
        component: ScheduledEvent
      }
    ]
  })

  /* eslint-disable no-new */
  new Vue({
    el: '#app',
    router,
    template: '<App/>',
    components: {App}
  })
}

// keycloak will add an iframe. Therefore wait for DOM to be ready first
$(document).ready(function () {
  DukeconKeycloak.getKeycloak().init({onLoad: 'check-sso'}).success(function (authenticated) {
    // keycloak will do URL redirects. This interferes with Vue Router, therefore init Vue afterwards
    initVue()
  }).error(function () {
    alert('failed to initialize')
  })
})
<commit_msg>make tests run without keycloak #2<commit_after>// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import DukeconKeycloak from './DukeconKeycloak'
import Router from 'vue-router'
import Schedule from '@/components/Schedule'
import ScheduledEvent from '@/components/ScheduledEvent'
import $ from 'jquery'

Vue.config.productionTip = false

function initVue () {
  Vue.use(Router)
  const router = new Router({
    routes: [
      {
        path: '/',
        name: 'schedule',
        component: Schedule
      },
      {
        path: '/scheduledEvent/:eventId',
        name: 'scheduledEvent',
        component: ScheduledEvent
      }
    ]
  })

  /* eslint-disable no-new */
  new Vue({
    el: '#app',
    router,
    template: '<App/>',
    components: {App}
  })
}

// keycloak will add an iframe. Therefore wait for DOM to be ready first
$(document).ready(function () {
  DukeconKeycloak.getKeycloak().init({onLoad: 'check-sso'}).success(function (authenticated) {
    // keycloak will do URL redirects. This interferes with Vue Router, therefore init Vue afterwards
    initVue()
  }).error(function () {
    console.log('failed to initialize keycloak - might be in testing mode')
    initVue()
  })
})

{'fraction_non_alphanumeric': 0.12504780114722752, 'fraction_numerical': 0.0003824091778202677, 'mean_word_length': 3.037037037037037, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '855062', 'n_tokens_mistral': 822, 'n_tokens_neox': 807, 'n_words': 246}