Skip to content

Commit

Permalink
fix(test): remove @ngrx/store import
Browse files Browse the repository at this point in the history
Replace @ngrx/store INIT and UPDATE imports with hardcoded strings.

This was done to fix a module resolution issue where the tests couldn't
run
  • Loading branch information
rdlabo authored and BBlackwo committed Jan 21, 2022
1 parent 1454150 commit d720252
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions projects/lib/src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import deepmerge from 'deepmerge';
import {
INIT as INIT_ACTION,
UPDATE as UPDATE_ACTION
} from '@ngrx/store';

// Cannot import from the @ngrx/store package due to a module resolution issue.
// See Issue #206.
const INIT_ACTION = '@ngrx/store/init';
const UPDATE_ACTION = '@ngrx/store/update-reducers';

const detectDate = /(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/;

Expand Down
3 changes: 2 additions & 1 deletion spec/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import * as CryptoJS from 'crypto-js';
import deepmerge from 'deepmerge';
import 'localstorage-polyfill';
import { dateReviver, localStorageSync, rehydrateApplicationState, syncStateUpdate } from '../projects/lib/src/public_api';
import { INIT as INIT_ACTION } from '@ngrx/store';

const INIT_ACTION = '@ngrx/store/init';

// Very simple classes to test serialization options. They cover string, number, date, and nested classes
// The top level class has static functions to help test reviver, replacer, serialize and deserialize
Expand Down

0 comments on commit d720252

Please sign in to comment.