<commit_before>import React, {Component} from 'react'
import {API_GLOBAL} from '../../bundles/common'

import CodeMirror from 'react-codemirror'
import 'codemirror/mode/javascript/javascript'
import 'codemirror/mode/htmlmixed/htmlmixed'

const DEFAULT_URL = '/indikator/steder/K0301/arbeid/sysselsetting-etter-innvandringsgrunn/enkeltaar/' +
  '@$cmp:K0104,K0231,K1103;$u:prosent;$y:2013;innvgrunn5:arbeid,familie,flukt,annet_uoppgitt;kjonn:0'

function makeEmbedConfig(url) {
  return JSON.stringify({
    version: 1,
    url: url
  }, null, 2)
}

const SCRIPT_TAG = `<script
  id="imdikator-loader"
  data-api-host="imdikator-st.azurewebsites.net"
  src="http://imdikator.staging.o5.no/build/js/loader.js"
  async
  defer
/>`


const CODE = `<div data-imdikator="embed">
  <script type="application/json">
    ${indent(4)(makeEmbedConfig(DEFAULT_URL))}
  </script>
  Henter figur…
</div>`<commit_msg>Fix failing test<commit_after>import React, {Component} from 'react'
import {API_GLOBAL} from '../../bundles/common'

import CodeMirror from 'react-codemirror'
import 'codemirror/mode/javascript/javascript'
import 'codemirror/mode/htmlmixed/htmlmixed'

const DEFAULT_URL = '/indikator/steder/K0301/arbeid/sysselsetting-etter-innvandringsgrunn/enkeltaar/'
  + '@$cmp:K0104,K0231,K1103;$u:prosent;$y:2013;innvgrunn5:arbeid,familie,flukt,annet_uoppgitt;kjonn:0'

function makeEmbedConfig(url) {
  return JSON.stringify({
    version: 1,
    url: url
  }, null, 2)
}

const SCRIPT_TAG = `<script
  id="imdikator-loader"
  data-api-host="imdikator-st.azurewebsites.net"
  src="http://imdikator.staging.o5.no/build/js/loader.js"
  async
  defer
/>`


const CODE = `<div data-imdikator="embed">
  <script type="application/json">
    ${indent(4)(makeEmbedConfig(DEFAULT_URL))}
  </script>
  Henter figur…
</div>`
{'fraction_non_alphanumeric': 0.15605976757055895, 'fraction_numerical': 0.02877697841726619, 'mean_word_length': 5.343859649122807, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2123363', 'n_tokens_mistral': 763, 'n_tokens_neox': 711, 'n_words': 101}