summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDevlin Junker <devlin.junker@gmail.com>2023-08-09 07:59:03 -0700
committerBenjamin Brahmer <info@b-brahmer.de>2023-08-11 09:22:24 +0200
commite559cb35d4fed3c7c38c0dd3fd2d161b077f88af (patch)
tree02d617df61e678aba9bfd6ff62de2eb25236fb8c /tests
parent790701a82a06c4046cc66134d5b4d4c1e62cda74 (diff)
fix linting errors
Signed-off-by: Devlin Junker <devlin.junker@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/javascript/unit/store/feed.spec.ts16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/javascript/unit/store/feed.spec.ts b/tests/javascript/unit/store/feed.spec.ts
index ba15c9410..922c79f3f 100644
--- a/tests/javascript/unit/store/feed.spec.ts
+++ b/tests/javascript/unit/store/feed.spec.ts
@@ -13,7 +13,7 @@ describe('feed.ts', () => {
describe('actions', () => {
describe('ADD_FEED', () => {
it('should call POST and commit feed to state', async () => {
- (axios as any).post.mockResolvedValue({ data: { feeds: [] }})
+ (axios as any).post.mockResolvedValue({ data: { feeds: [] } })
const commit = jest.fn()
await actions[FEED_ACTION_TYPES.ADD_FEED]({ commit }, { feedReq: { url: '' } })
expect(axios.post).toBeCalled()
@@ -30,8 +30,6 @@ describe('feed.ts', () => {
})
})
-
-
it('FETCH_FEEDS should call GET and commit returned feeds to state', async () => {
(axios as any).get.mockResolvedValue({ data: { feeds: [] } })
const commit = jest.fn()
@@ -46,23 +44,23 @@ describe('feed.ts', () => {
it('should add feeds to state', () => {
const state = { feeds: [] as Feed[], folders: [] as any[] } as AppState
let feeds = [] as any
-
+
mutations[FEED_MUTATION_TYPES.SET_FEEDS](state, feeds)
expect(state.feeds.length).toEqual(0)
-
+
feeds = [{ title: 'test' }] as Feed[]
-
+
mutations[FEED_MUTATION_TYPES.SET_FEEDS](state, feeds)
expect(state.feeds.length).toEqual(1)
expect(state.feeds[0]).toEqual(feeds[0])
})
})
-
+
describe('ADD_FEED', () => {
it('should add a single feed to state', () => {
const state = { feeds: [] as Feed[], folders: [] as any[] } as AppState
- let feed = { title: 'test' } as any;
-
+ const feed = { title: 'test' } as any
+
mutations[FEED_MUTATION_TYPES.ADD_FEED](state, feed)
expect(state.feeds.length).toEqual(1)
expect(state.feeds[0]).toEqual(feed)