Skip to content

Commit

Permalink
Merge pull request #34 from open-ish/feat/use-npm
Browse files Browse the repository at this point in the history
feat: use npm instead
  • Loading branch information
tassioFront authored Oct 29, 2024
2 parents c250c72 + 86d5298 commit 7225531
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/http-front-cache/src/lib/cache-factory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ describe('cacheFactory', () => {
}
);

it('Should not call the service function again if cache is available', async () => {
await cachedServiceFunction(defaultParams);
expect(mockServiceFunction).toHaveBeenCalledTimes(1);
await cachedServiceFunction(defaultParams);
expect(mockServiceFunction).toHaveBeenCalledTimes(1);
});

it('should not set data in the cache if the service function throws an error', async () => {
mockServiceFunction.mockImplementationOnce(async () => {
throw new Error('Error');
Expand Down
1 change: 1 addition & 0 deletions release.config.base.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
extends: 'semantic-release-npm-github-publish',
plugins: ['@semantic-release/npm'],
};

0 comments on commit 7225531

Please sign in to comment.