Skip to content

Commit

Permalink
Run linter
Browse files Browse the repository at this point in the history
  • Loading branch information
aiden2480 committed Oct 14, 2024
1 parent 21f60c6 commit 5de9706
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class ChromeWebStoreLastUpdated extends BaseChromeWebStoreService
}

static defaultBadgeData = {
label: 'extension last updated'
label: 'extension last updated',
}

async handle({ storeId }) {
Expand All @@ -31,7 +31,7 @@ export default class ChromeWebStoreLastUpdated extends BaseChromeWebStoreService
throw new NotFound({ prettyMessage: 'not found' })
}

const lastUpdatedDate = Date.parse(lastUpdated);
const lastUpdatedDate = Date.parse(lastUpdated)

return {
message: formatDate(lastUpdatedDate),
Expand Down
15 changes: 10 additions & 5 deletions services/chrome-web-store/chrome-web-store-last-updated.tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ import { createServiceTester } from '../tester.js'

export const t = await createServiceTester()

t.create('Last updated').get('/nccfelhkfpbnefflolffkclhenplhiab.json').expectBadge({
label: 'extension last updated',
message: isFormattedDate,
})
t.create('Last updated')
.get('/nccfelhkfpbnefflolffkclhenplhiab.json')
.expectBadge({
label: 'extension last updated',
message: isFormattedDate,
})

t.create('Last updated (not found)')
.get('/invalid-name-of-addon.json')
.expectBadge({ label: 'extension last updated', message: 'not found' })
.expectBadge({
label: 'extension last updated',
message: 'not found',
})
2 changes: 1 addition & 1 deletion services/chrome-web-store/chrome-web-store-size.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class ChromeWebStoreSize extends BaseChromeWebStoreService {

static defaultBadgeData = {
label: 'extension size',
color: 'blue'
color: 'blue',
}

async handle({ storeId }) {
Expand Down
2 changes: 1 addition & 1 deletion services/chrome-web-store/chrome-web-store-size.tester.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createServiceTester } from '../tester.js'

export const t = await createServiceTester()
const isFileSize = /^\d+(\.\d+)?(MiB|KiB)$/;
const isFileSize = /^\d+(\.\d+)?(MiB|KiB)$/

t.create('Size').get('/nccfelhkfpbnefflolffkclhenplhiab.json').expectBadge({
label: 'extension size',
Expand Down

0 comments on commit 5de9706

Please sign in to comment.