<commit_before>/*
eslint
@typescript-eslint/explicit-function-return-type: 0,
@typescript-eslint/no-explicit-any: 0
*/
import { ServiceState } from './types'
import { assert } from 'chai'
import feathersVuex from '../../src/index'
import { feathersRestClient as feathersClient } from '../fixtures/feathers-client'
import { clearModels } from '../../src/service-module/global-models'
import memory from 'feathers-memory'
import Vuex from 'vuex'
import { makeStore } from '../test-utils'
import ObjectID from 'bson-objectid'

interface RootState {
  transactions: ServiceState
}

class ComicService extends memory.Service {
  public create(data, params, callback) {
    return super.create(data, params, callback).then(response => {
      delete response.__id
      delete response.__isTemp
      return response
    })
  }
  public update(id, data, params, callback) {
    data.createdAt = new Date()
    // this._super(data, params, callback)
  }
}

function makeContext() {
  feathersClient.use(
    'comics',
    // @ts-ignore
    new ComicService({ store: makeStore() })
  )
  const { makeServicePlugin, BaseModel } = feathersVuex(feathersClient, {
    serverAlias: 'default'
  })
  class Comic extends BaseModel {
    public static modelName = 'Comic'
    public static test: boolean = true

    public constructor(data, options?) {
      super(data, options)
    }
  }
  const store = new Vuex.Store({<commit_msg>chore: update test to use latest feathers-memory<commit_after>/*
eslint
@typescript-eslint/explicit-function-return-type: 0,
@typescript-eslint/no-explicit-any: 0
*/
import { ServiceState } from './types'
import { assert } from 'chai'
import feathersVuex from '../../src/index'
import { feathersRestClient as feathersClient } from '../fixtures/feathers-client'
import { clearModels } from '../../src/service-module/global-models'
import { Service as MemoryService } from 'feathers-memory'
import Vuex from 'vuex'
import { makeStore } from '../test-utils'
import ObjectID from 'bson-objectid'

interface RootState {
  transactions: ServiceState
}

class ComicService extends MemoryService {
  public create(data, params) {
    return super.create(data, params).then(response => {
      delete response.__id
      delete response.__isTemp
      return response
    })
  }
  // @ts-ignore
  public update(id, data, params) {
    data.createdAt = new Date()
    // this._super(data, params, callback)
  }
}

function makeContext() {
  feathersClient.use(
    'comics',
    // @ts-ignore
    new ComicService({ store: makeStore() })
  )
  const { makeServicePlugin, BaseModel } = feathersVuex(feathersClient, {
    serverAlias: 'default'
  })
  class Comic extends BaseModel {
    public static modelName = 'Comic'
    public static test: boolean = true

    public constructor(data, options?) {
      super(data, options)
    }
  }
  const store = new Vuex.Store({
{'fraction_non_alphanumeric': 0.12300208478109799, 'fraction_numerical': 0.001389854065323141, 'mean_word_length': 3.5625990491283677, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1549802', 'n_tokens_mistral': 881, 'n_tokens_neox': 873, 'n_words': 233}