<commit_before>const assert = require('assert')
const ElectronConfig = require('electron-config')
const storage = new ElectronConfig({ name: 'config-test' })
const DefaultFilters = require('../../src/models/DefaultFilters')
const DEFAULT_FILTER_KEY = 'default-filters'
const login = 'RupertScrivener'

describe('DefaultFilters', () => {
  describe('init', () => {
    beforeEach(() => {
      const filters = new DefaultFilters(login)
      filters.addDefaults()
    })

    it('creates the default filters', () => {
      assert.equal(true, storage.has('My Issues'))<commit_msg>Fix flaky test caused by persistent data<commit_after>const assert = require('assert')
const ElectronConfig = require('electron-config')
const storage = new ElectronConfig({ name: 'config-test' })
const DefaultFilters = require('../../src/models/DefaultFilters')
const DEFAULT_FILTER_KEY = 'default-filters'
const login = 'RupertScrivener'

describe('DefaultFilters', () => {
  describe('addDefaults', () => {
    beforeEach(() => {
      storage.clear()
      const filters = new DefaultFilters(login)
      filters.addDefaults()
    })

    it('creates the default filters', () => {
      assert.equal(true, storage.has('My Issues'))
{'fraction_non_alphanumeric': 0.1556836902800659, 'fraction_numerical': 0.0, 'mean_word_length': 4.497737556561086, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '5981436', 'n_tokens_mistral': 344, 'n_tokens_neox': 334, 'n_words': 78}