You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

store.getters.js 458 B

7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
1234567891011121314151617181920
  1. import test from 'ava';
  2. import * as getters from '../src/store/getters';
  3. test('version', t => {
  4. const state = {
  5. password: {version: 2},
  6. defaultPassword: {version: 1}
  7. };
  8. const version = getters.version(state);
  9. t.is(version, 2);
  10. });
  11. test('version no password', t => {
  12. const state = {
  13. password: null,
  14. defaultPassword: {version: 1}
  15. };
  16. const version = getters.version(state);
  17. t.is(version, 1);
  18. });