Permalink
Browse files

fix(test): fix unit test

  • Loading branch information...
kt3k committed Nov 29, 2018
1 parent 274c558 commit a43dbe9b51e15ff22c924dbd5792e8b1c884a05b
Showing with 5 additions and 7 deletions.
  1. +4 −1 karma.conf.js
  2. +0 −1 src/component/todo-list.js
  3. +1 −1 src/service/__tests__/router.js
  4. +0 −1 src/service/router.js
  5. +0 −3 src/service/todoapp.js
@@ -13,7 +13,10 @@ module.exports = config =>
{
presets: ['@babel/preset-env'],
plugins: [
['@babel/plugin-proposal-decorators', { legacy: true }],
[
'@babel/plugin-proposal-decorators',
{ decoratorsBeforeExport: false }
],
'@babel/plugin-proposal-class-properties',
'istanbul'
]
@@ -14,7 +14,6 @@ class TodoList {
*/
@on(MODEL_UPDATE)
onRefresh ({ detail: { todoCollection, filter } }) {
console.log('onRefresh')
const visibleTodos = todoCollection.filterBy(filter)

if (this.shouldResetContents(filter, visibleTodos)) {
@@ -48,6 +48,6 @@ describe('router', () => {
done()
})

router['*']()
router['(.*)']()
})
})
@@ -13,7 +13,6 @@ const { component, emits } = require('capsid')
@component('router')
class Router {
onHashchange () {
console.log('onHashChange')
dispatch(this)
}

@@ -39,14 +39,11 @@ class Todoapp {
save () {
this.todoRepository.saveAll(this.todoCollection)

console.log(this)

return this
}

@on(CHANGE_FILTER)
onFilterchange ({ detail: filter }) {
console.log('onFilterChange')
this.filter = filter
this.save()
}

0 comments on commit a43dbe9

Please sign in to comment.