Skip to content

Commit

Permalink
fixed test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
lexmihaylov committed Feb 2, 2024
1 parent f182a2a commit 3b3deda
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
verbose: true,
transform: {
'^.+\\.ts?$': 'ts-jest',
},
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"clean": "rm -rf dist",
"prepublishOnly": "npm run build",
"postpublish": "npm run clean",
"test": "jest --silent --verbose --collect-coverage tests"
"test": "jest --silent --verbose --collect-coverage"
},
"author": "Alexander Mihaylov (https://lexmihaylov/github.io)",
"license": "MIT",
Expand All @@ -34,4 +34,4 @@
"jest": "^29.5.0",
"ts-jest": "^29.1.0"
}
}
}
4 changes: 2 additions & 2 deletions tests/StreamDebugLogger.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('StreamDebugLogger', () => {
const actionName = 'testAction';

const consoleSpy = jest.spyOn(console, 'info');
streamStore.createAction(actionName, {foo: 'bar'});
streamStore.createAction(actionName, { foo: 'bar' });
logger.logActionCreation(actionName);
expect(consoleSpy).toHaveBeenCalledWith(`[${actionName}] action created`);
});
Expand All @@ -51,7 +51,7 @@ describe('StreamDebugLogger', () => {
const actionName = 'testAction';
streamStore.createAction(actionName, null);
const consoleSpy = jest.spyOn(console, 'info');
streamStore.createEffect(actionName, () => {});
streamStore.createEffect(actionName, () => { });
streamStore.dispatch(actionName, null);
logger.logEffect(actionName);
expect(consoleSpy).toHaveBeenCalledWith(`[${actionName}] effect triggered`);
Expand Down

0 comments on commit 3b3deda

Please sign in to comment.