Skip to content

Commit

Permalink
update indexed-db tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fadi-george committed Jan 29, 2025
1 parent 98d9164 commit 54ad010
Show file tree
Hide file tree
Showing 9 changed files with 2,229 additions and 3,278 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build/bundles
build/releases
build/size-analysis.html
/config.json

package-lock.json

.DS_STORE
*.pem
Expand Down
263 changes: 0 additions & 263 deletions __test__/unit/services/indexedDb.test.ts

This file was deleted.

13 changes: 9 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
/** @returns {Promise<import('jest').Config>} */
module.exports = async () => {
return {
coverageDirectory: 'coverage',
coverageReporters: ['text-summary', 'lcov'],
verbose: true,
preset: "ts-jest",
preset: 'ts-jest',
forceExit: true,
bail: true,
testEnvironment: "jsdom",
testEnvironment: 'jsdom',
// Run these files after jest has been
// installed in the environment
setupFilesAfterEnv: ["<rootDir>/__test__/jest/jest.setup.ts"], // use .js if you prefer JavaScript,
setupFiles: ["jest-localstorage-mock", "<rootDir>/__test__/jest/jest.setupfiles.ts"],
setupFilesAfterEnv: ['<rootDir>/__test__/jest/jest.setup.ts'], // use .js if you prefer JavaScript,
setupFiles: [
'jest-localstorage-mock',
'<rootDir>/__test__/jest/jest.setupfiles.ts',
],
resetMocks: false,
// hide type errors: https://stackoverflow.com/questions/73687337/disable-type-checking-stopped-working-after-ts-jest-upgrade-to-29-0
globals: {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"postcss-discard-comments": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz",
"postcss-filter-plugins": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz",
"regenerator-runtime": "^0.13.2",
"sass": "^1.62.0",
"sass": "^1.83.4",
"terser-webpack-plugin": "^5.3.7",
"tslib": "^2.5.0",
"validator": "https://registry.npmjs.org/validator/-/validator-6.0.0.tgz"
Expand Down Expand Up @@ -94,7 +94,6 @@
"nock": "^9.1.6",
"node-dir": "^0.1.16",
"node-fetch": "^2.6.1",
"node-sass": "^8.0.0",
"nyc": "^11.1.0",
"postcss-loader": "^7.2.4",
"prettier": "3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/page/bell/Button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default class Button extends ActiveAnimatedElement {
return;
}

const optedOut = LimitStore.getLast('subscription.optedOut');
const optedOut = LimitStore.getLast<boolean>('subscription.optedOut');
if (this.bell.unsubscribed) {
if (optedOut) {
// The user is manually opted out, but still "really" subscribed
Expand Down
Loading

0 comments on commit 54ad010

Please sign in to comment.